Commit 37d1b807 authored by Jan Möbius's avatar Jan Möbius

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8659 383ad7c9-94d9-4d36-a494-682f7c89f535
parents
include (plugin)
openflipper_plugin (DIRS config parser scene types types/objectId INSTALLDATA Icons VsiMetadata)
<OpenFlipper>
<element name="decimater_decimate">
<category>Algorithms</category>
<short>Decimater</short>
<long>Decimate a given object</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID of an Object</short>
<long>ID of an Object</long>
</input>
<input name="vertices" type="Number" optional="true">
<short>Number of Vertices</short>
<long>Desired resulting number of vertices</long>
<min>1</min>
<max>5000000</max>
<precision>1</precision>
</input>
<input name="distance" type="Number" optional="true">
<short>Distance</short>
<precision>0.001</precision>
</input>
<input name="normal_deviation" type="Number" optional="true">
<short>Normal deviation</short>
<min>0</min>
<max>180</max>
<precision>1</precision>
</input>
<input name="roundness" type="Number" optional="true">
<short>Roundness</short>
<min>0</min>
<max>1</max>
<precision>0.01</precision>
</input>
</inputs>
<precode>
var decimater_constraints
</precode>
<code>
decimater_constraints = new Object ();
if ([is_set="vertices"])
decimater_constraints["vertices"] = [input="vertices"];
if ([is_set="distance"])
decimater_constraints["distance"] = [input="distance"];
if ([is_set="normal_deviation"])
decimater_constraints["normal_deviation"] = [input="normal_deviation"];
if ([is_set="roundness"])
decimater_constraints["roundness"] = [input="roundness"];
decimater.decimate ([input="obj"],decimater_constraints);
</code>
</element>
</OpenFlipper>
\ No newline at end of file
<OpenFlipper>
<element name="message_box">
<category>Widgets</category>
<short>Message box</short>
<long>Shows a message box</long>
<dataflow>true</dataflow>
<inputs>
<input name="message" type="String" external="false" runtime="false">
<short>Displayed message</short>
<long>Displayed message. $1, $2 and $3 will be raplaced with the inputs.</long>
<default>Values: $1 $2 $3</default>
</input>
<input name="in1" type="Any" optional="true">
<short>$1 input</short>
<long>$1 in the message will be replaced with this input</long>
</input>
<input name="in2" type="Any" optional="true">
<short>$2 input</short>
<long>$2 in the message will be replaced with this input</long>
</input>
<input name="in3" type="Any" optional="true">
<short>$3 input</short>
<long>$3 in the message will be replaced with this input</long>
</input>
</inputs>
<code>
var message = [input="message"];
message = message.replace(/\$1/g, [input="in1"]);
message = message.replace(/\$2/g, [input="in2"]);
message = message.replace(/\$3/g, [input="in3"]);
visualscripting.messageBox (message);
</code>
</element>
<element name="question_box">
<category>Widgets</category>
<short>Yes/No box</short>
<long>Shows a message box with Yes and No buttons</long>
<dataflow>true</dataflow>
<inputs>
<input name="message" type="String" external="false" runtime="false">
<short>Displayed message</short>
<long>Displayed message</long>
<default>Question?</default>
</input>
</inputs>
<outputs>
<output name="ret" type="Bool">
<short>Pressed button</short>
<long>Pressed button. "true" on Yes and "false" on No</long>
</output>
</outputs>
<code>
[output="ret"] = visualscripting.questionBox ([input="message"]);
</code>
</element>
<element name="question_box_with_inputs">
<category>Widgets</category>
<short>Yes/No with Inputs</short>
<long>Shows a message box with Yes and No buttons</long>
<dataflow>true</dataflow>
<inputs>
<input name="message" type="String" external="false" runtime="false">
<short>Displayed message</short>
<long>Displayed message. $1, $2 and $3 will be raplaced with the inputs.</long>
<default>Question? $1 $2 $3</default>
</input>
<input name="in1" type="Any" optional="true">
<short>$1 input</short>
<long>$1 in the message will be replaced with this input</long>
</input>
<input name="in2" type="Any" optional="true">
<short>$2 input</short>
<long>$2 in the message will be replaced with this input</long>
</input>
<input name="in3" type="Any" optional="true">
<short>$3 input</short>
<long>$3 in the message will be replaced with this input</long>
</input>
</inputs>
<outputs>
<output name="ret" type="Bool">
<short>Pressed button</short>
<long>Pressed button. "true" on Yes and "false" on No</long>
</output>
</outputs>
<code>
var message = [input="message"];
message = message.replace(/\$1/g, [input="in1"]);
message = message.replace(/\$2/g, [input="in2"]);
message = message.replace(/\$3/g, [input="in3"]);
[output="ret"] = visualscripting.questionBox (message);
</code>
</element>
</OpenFlipper>
\ No newline at end of file
<OpenFlipper>
<element name="info_vertexCount">
<category>Object Info</category>
<short>Element Count</short>
<long>Returns the number of vertices, edges, faces, boundaries, components.</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID of an object</short>
<long>ID of an object</long>
</input>
</inputs>
<outputs>
<output name="nVert" type="Number">
<short>Number of vertices</short>
<long>Number of vertices of the given object</long>
</output>
<output name="nEdge" type="Number">
<short>Number of edges</short>
<long>Number of edges of the given object</long>
</output>
<output name="nFace" type="Number">
<short>Number of faces</short>
<long>Number of faces of the given object</long>
</output>
<output name="nBound" type="Number">
<short>Number of boundaries</short>
<long>Number of boundaries of the given object</long>
</output>
<output name="nComp" type="Number">
<short>Number of components</short>
<long>Number of components of the given object</long>
</output>
</outputs>
<code>
if ([is_connected="nVert"])
[output="nVert"] = info.vertexCount([input="obj"]);
if ([is_connected="nEdge"])
[output="nEdge"] = info.edgeCount([input="obj"]);
if ([is_connected="nFace"])
[output="nFace"] = info.faceCount([input="obj"]);
if ([is_connected="nBound"])
[output="nBound"] = info.boundaryCount([input="obj"]);
if ([is_connected="nComp"])
[output="nComp"] = info.componentCount([input="obj"]);
</code>
</element>
<element name="info_edgeLength">
<category>Object Info</category>
<short>Edge Lengths</short>
<long>Returns the edge lengths of an object</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID of an object</short>
<long>ID of an object</long>
</input>
</inputs>
<outputs>
<output name="minEdgeLength" type="Number">
<short>Minimal edge lenght</short>
<long>Minimal edge lenght of the given object</long>
</output>
<output name="maxEdgeLength" type="Number">
<short>Maximal edge lenght</short>
<long>Maximal edge lenght of the given object</long>
</output>
<output name="meanEdgeLength" type="Number">
<short>Mean edge lenght</short>
<long>Mean edge lenght of the given object</long>
</output>
</outputs>
<code>
if ([is_connected="minEdgeLength"])
[output="minEdgeLength"] = info.minEdgeLength([input="obj"]);
if ([is_connected="maxEdgeLength"])
[output="maxEdgeLength"] = info.maxEdgeLength([input="obj"]);
if ([is_connected="meanEdgeLength"])
[output="meanEdgeLength"] = info.meanEdgeLength([input="obj"]);
</code>
</element>
<element name="info_bBox">
<category>Object Info</category>
<short>Bounding box</short>
<long>Returns the boundding box of an object</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID of an object</short>
<long>ID of an object</long>
</input>
</inputs>
<outputs>
<output name="min" type="Vector">
<short>Minumum bounding box point</short>
<long>Minumum bounding box point of the given object</long>
</output>
<output name="max" type="Vector">
<short>Maximum bounding box point</short>
<long>Maximum bounding box point of the given object</long>
</output>
<output name="size" type="Vector">
<short>Bounding box size</short>
<long>Size of the bounding box of the given object</long>
</output>
<output name="cog" type="Vector">
<short>Center of gravity</short>
<long>Center of gravity of the given object</long>
</output>
</outputs>
<code>
if ([is_connected="min"])
[output="min"] = info.boundingBoxMin([input="obj"]);
if ([is_connected="max"])
[output="max"] = info.boundingBoxMax([input="obj"]);
if ([is_connected="size"])
[output="size"] = info.boundingBoxSize([input="obj"]);
if ([is_connected="cog"])
[output="cog"] = info.cog([input="obj"]);
</code>
</element>
</OpenFlipper>
\ No newline at end of file
<OpenFlipper>
<element name="isotropicremesher_remesh">
<category>Algorithms</category>
<short>Isotropic Remeshing</short>
<long>Isotropic Remeshing</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID of an Object</short>
<long>ID of an Object</long>
</input>
<input name="eLength" type="Number">
<short>Target edge length</short>
<long>Desired resulting edge length</long>
<min>0.0</min>
<max>1000</max>
<precision>0.0001</precision>
</input>
</inputs>
<code>
isotropicremesher.isotropicRemesh([input="obj"],[input="eLength"]);
</code>
</element>
</OpenFlipper>
\ No newline at end of file
<OpenFlipper>
<element name="while">
<category>Conditions and Loops</category>
<short>While loop</short>
<long>While loop implementation</long>
<dataflow>true</dataflow>
<functions>
<function name="condition">
<short>Condition</short>
<outputs>
<output name="out" type="Bool">
<short>Loop condition</short>
</output>
</outputs>
</function>
<function name="content">
<short>Content</short>
</function>
</functions>
<code>
while ([function="test"]().out)
[function="content"]()
</code>
</element>
<element name="if">
<category>Conditions and Loops</category>
<short>IF</short>
<long>IF condition</long>
<dataflow>true</dataflow>
<inputs>
<input name="test" type="Bool" user="false">
<short>Test</short>
</input>
</inputs>
<functions>
<function name="true">
<short>"true" case</short>
</function>
<function name="content">
<short>"false" case</short>
</function>
</functions>
<code>
if ([input="test"])
[function="true"]();
else
[function="false"]();
</code>
</element>
</OpenFlipper>
\ No newline at end of file
<OpenFlipper>
<element name="math">
<category>Math</category>
<short>Simple Math</short>
<long>Adds, Subtracts, Multiplies and Devides two values</long>
<inputs>
<input name="a" type="Number">
<short>A</short>
<precision>0.000001</precision>
</input>
<input name="b" type="Number">
<short>B</short>
<precision>0.000001</precision>
</input>
</inputs>
<outputs>
<output name="add" type="Number">
<short>A + B</short>
</output>
<output name="sub" type="Number">
<short>A - B</short>
</output>
<output name="mul" type="Number">
<short>A * B</short>
</output>
<output name="div" type="Number">
<short>A / B</short>
</output>
<output name="pow" type="Number">
<short>A^B</short>
<long>The value of A raised to the power of B.</long>
</output>
</outputs>
<code>
if ([is_connected="add"])
[output="add"] = [input="a"] + [input="b"];
if ([is_connected="sub"])
[output="sub"] = [input="a"] - [input="b"];
if ([is_connected="mul"])
[output="mul"] = [input="a"] * [input="b"];
if ([is_connected="div"])
[output="div"] = [input="a"] / [input="b"];
if ([is_connected="pow"])
[output="pow"] = Math.pow ([input="a"],[input="b"]);
</code>
</element>
<element name="minmax">
<category>Math</category>
<short>Minimum / Maximum</short>
<long>Minimum / Maximum of two values.</long>
<inputs>
<input name="a" type="Number">
<short>A</short>
<precision>0.000001</precision>
</input>
<input name="b" type="Number">
<short>B</short>
<precision>0.000001</precision>
</input>
</inputs>
<outputs>
<output name="min" type="Number">
<short>min (A, B)</short>
<long>Returns the lesser of a and b.</long>
</output>
<output name="max" type="Number">
<short>max (A, B)</short>
<long>Returns the larger of a and b.</long>
</output>
</outputs>
<code>
if ([is_connected="min"])
[output="min"] = Math.min ([input="a"], [input="b"]);
if ([is_connected="max"])
[output="max"] = Math.max ([input="a"], [input="b"]);
</code>
</element>
<element name="round">
<category>Math</category>
<short>Rounding</short>
<long>Rounding and absolute values.</long>
<inputs>
<input name="x" type="Number">
<short>X</short>
<precision>0.000001</precision>
</input>
</inputs>
<outputs>
<output name="abs" type="Number">
<short>abs (X)</short>
<long>Returns absolute value of X.</long>
</output>
<output name="round" type="Number">
<short>round (X)</short>
<long>Rounds X up or down to the nearest integer. It rounds .5 up.</long>
</output>
<output name="floor" type="Number">
<short>floor (X)</short>
<long>Returns the largest integer less than or equal to X. (round down)</long>
</output>
<output name="ceil" type="Number">
<short>ceil (X)</short>
<long>Returns the smallest integer greater than or equal to X. (round up).</long>
</output>
</outputs>
<code>
if ([is_connected="abs"])
[output="abs"] = Math.abs ([input="x"]);
if ([is_connected="round"])
[output="round"] = Math.round ([input="x"]);
if ([is_connected="floor"])
[output="floor"] = Math.floor ([input="x"]);
if ([is_connected="ceil"])
[output="ceil"] = Math.ceil ([input="x"]);
</code>
</element>
<element name="random">
<category>Math</category>
<short>Random number</short>
<long>Returns a pseudorandom number between 0 and 1.</long>
<outputs>
<output name="random" type="Number">
<short>Random number</short>
<long>Returns a pseudorandom number between 0 and 1.</long>
</output>
</outputs>
<code>
[output="random"] = Math.random ();
</code>
</element>
<element name="trig">
<category>Math</category>
<short>Trigonometry</short>
<long>Trigonometric functions</long>
<inputs>
<input name="x" type="Number">
<short>X</short>
<precision>0.000001</precision>
</input>
</inputs>
<outputs>
<output name="sin" type="Number">
<short>Sine</short>
<long> Returns the Sin of X, where X is in radians.</long>
</output>
<output name="cos" type="Number">
<short>Cosine</short>
<long> Returns cosine of X, where X is in radians.</long>
</output>
<output name="tan" type="Number">
<short>Tangent</short>
<long>Returns the Tan of X, where X is in radians.</long>
</output>
<output name="asin" type="Number">
<short>Arc sine</short>
<long>Returns arc sine of X in radians.</long>
</output>
<output name="acos" type="Number">
<short>Arc cosine</short>
<long>Returns arc cosine of X in radians.</long>
</output>
<output name="atan" type="Number">
<short>Arc Tangent</short>
<long>Returns arc tan of X in radians.</long>
</output>
<output name="deg2rad" type="Number">
<short>Degrees to radians</short>
<long>Converts degrees to radians.</long>
</output>
<output name="rad2deg" type="Number">
<short>Radians to degrees</short>
<long>Converts radians to degrees.</long>
</output>
</outputs>
<code>
if ([is_connected="sin"])
[output="sin"] = Math.sin([input="x"]);
if ([is_connected="cos"])
[output="cos"] = Math.cos([input="x"]);
if ([is_connected="tan"])
[output="tan"] = Math.tan([input="x"]);
if ([is_connected="asin"])
[output="asin"] = Math.asin([input="x"]);
if ([is_connected="acos"])
[output="acos"] = Math.acos([input="x"]);
if ([is_connected="atan"])
[output="atan"] = Math.atan([input="x"]);
if ([is_connected="deg2rad"])
[output="deg2rad"] = [input="x"] * (Math.PI / 180.0);
if ([is_connected="rad2deg"])
[output="rad2deg"] = [input="x"] * (180.0 / Math.PI);
</code>
</element>
<element name="logarithm">
<category>Math</category>
<short>Logarithm</short>
<inputs>
<input name="x" type="Number">
<short>X</short>
<precision>0.000001</precision>
</input>
</inputs>
<outputs>
<output name="ln" type="Number">
<short>ln (X)</short>
<long>Returns the natural logarithm (base E) of x.</long>
</output>
<output name="exp" type="Number">
<short>exp (X)</short>
<long>Returns E^X.</long>
</output>
</outputs>
<code>
if ([is_connected="ln"])
[output="ln"] = Math.log([input="x"]);
if ([is_connected="exp"])
[output="exp"] = Math.exp([input="x"]);
</code>
</element>
<element name="constant">
<category>Constants</category>
<short>Constant number</short>
<long>Constant number</long>
<inputs>
<input name="c" type="Number" external="false">
<short>Constant value</short>
<long>Constant value</long>
<default>0</default>
</input>
</inputs>
<outputs>
<output name="out" type="Number">
<short>Configured Value</short>
<long>This element returns the configured value</long>
</output>
</outputs>
<code>
[output="out"] = [input="c"];
</code>
</element>
<element name="math_constant">
<category>Constants</category>
<short>Math constants</short>
<long>Mathematical constants</long>
<outputs>
<output name="e" type="Number">
<short>E</short>
<long>The constant of E, the base of natural logarithms.</long>
</output>
<output name="ln2" type="Number">
<short>ln (2)</short>
<long>The natural logarithm of 2</long>
</output>
<output name="ln10" type="Number">
<short>ln (10)</short>
<long>The natural logarithm of 10</long>
</output>
<output name="log2E" type="Number">
<short>log2 (E)</short>
<long>Base 2 logarithm of E.</long>
</output>
<output name="log10E" type="Number">
<short>log10 (E)</short>
<long>Base 10 logarithm of E.</long>
</output>
<output name="pi" type="Number">
<short>PI</short>
<long>Returns PI.</long>
</output>
<output name="sqrt1_2" type="Number">
<short>sqrt (0.5)</short>
<long>Square root of 1/2.</long>
</output>
<output name="sqrt2" type="Number">
<short>sqrt (2)</short>
<long>Square root of 2.</long>
</output>
</outputs>
<code>
[output="e"] = Math.E;
[output="ln2"] = Math.LN2;
[output="ln10"] = Math.LN10;
[output="log2E"] = Math.LOG2E;
[output="log10E"] = Math.LOG10E;
[output="pi"] = Math.PI;
[output="sqrt1_2"] = Math.SQRT1_2;
[output="sqrt2"] = Math.SQRT2;
</code>
</element>
</OpenFlipper>
\ No newline at end of file
This diff is collapsed.
<OpenFlipper>
<element name="object_iterator">
<category>Conditions and Loops</category>
<short>Object Iterator</short>
<long>Iterate over all objects that match the given inputs</long>
<dataflow>true</dataflow>
<inputs>
<input name="selection" type="Selection" external="false" runtime="false">
<short>Object Selection</short>
<default>all</default>
<names>all,source,target</names>
<descriptions>All,Source,Target</descriptions>
</input>
<input name="types" type="Selection" external="false" runtime="false">
<short>Object Type</short>
<multiple>true</multiple>
<default>All</default>
<names>All,TriangleMesh,PolyMesh,Group,BSplineCurve,BSplineSurface,Skeleton,GIS</names>
<descriptions>All,Triangle mesh,Polygon mesh,Group,B-Spline curve,B-Spline surface,Skeleton,GIS</descriptions>
</input>
<input name="custom_type" type="String" external="false" runtime="false" optional="">
<short>Custom Object Type</short>
<long>Additional custom object type</long>
<default></default>
</input>
</inputs>
<functions>