[DOCS] Update 12 VisualScript* nodes

This commit is contained in:
Chris Bradfield 2017-10-14 20:11:00 -07:00
parent b005c5fcec
commit 6172f09703
12 changed files with 98 additions and 11 deletions

View File

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
A Visual Script node representing a constant from a class.
Gets a constant from a given class.
</brief_description>
<description>
A Visual Script node representing a constant from the classes, such as [@GlobalScope.TYPE_INT].
This node returns a constant from a given class, such as [@GlobalScope.TYPE_INT]. See the given class' documentation for available constants.
[b]Input Ports:[/b]
none
[b]Output Ports:[/b]
- Data (variant): [code]value[/code]
</description>
<tutorials>
</tutorials>
@ -42,10 +46,10 @@
</methods>
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
The type to get the constant from.
The constant's parent class.
</member>
<member name="constant" type="String" setter="set_class_constant" getter="get_class_constant">
The name of the constant to return.
The constant to return. See the given class for its available constants.
</member>
</members>
<constants>

View File

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
A Visual Script node which returns a constant value.
Gets a contant's value.
</brief_description>
<description>
A Visual Script node which returns the specified constant value.
This node returns a constant's value.
[b]Input Ports:[/b]
none
[b]Output Ports:[/b]
- Data (variant): [code]get[/code]
</description>
<tutorials>
</tutorials>

View File

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
A Visual Script node which emits a specified signal.
Emits a specified signal.
</brief_description>
<description>
A Visual Script node which emits a specified signal when it is executed.
Emits a specified signal when it is executed.
[b]Input Ports:[/b]
- Sequence: [code]emit[/code]
[b]Output Ports:[/b]
- Sequence
</description>
<tutorials>
</tutorials>

View File

@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Steps through items in a given input.
</brief_description>
<description>
This node steps through each item in a given input. Input can be any sequence data type, such as an [Array] or [String]. When each item has been processed, execution passed out the [code]exit[/code] Sequence port.
[b]Input Ports:[/b]
- Sequence: [code]for (elem) in (input)[/code]
- Data (variant): [code]input[/code]
[b]Output Ports:[/b]
- Sequence: [code]each[/code]
- Sequence: [code]exit[/code]
- Data (variant): [code]elem[/code]
</description>
<tutorials>
</tutorials>

View File

@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Gets a local variable's value.
</brief_description>
<description>
This node returns a local variable's value. "Var Name" must be supplied, with an optional type.
[b]Input Ports:[/b]
none
[b]Output Ports:[/b]
- Data (variant): [code]get[/code]
</description>
<tutorials>
</tutorials>
@ -40,8 +46,10 @@
</methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
The local variable's type.
</member>
<member name="var_name" type="String" setter="set_var_name" getter="get_var_name">
The local variable's name.
</member>
</members>
<constants>

View File

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Changes a local variable's value.
</brief_description>
<description>
The node changes a local variable's value to the given input. The new value is also provided on an output Data port.
[b]Input Ports:[/b]
- Sequence
- Data (variant): [code]set[/code]
[b]Output Ports:[/b]
- Sequence
- Data (variant): [code]get[/code]
</description>
<tutorials>
</tutorials>
@ -40,8 +48,10 @@
</methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type">
The local variable's type.
</member>
<member name="var_name" type="String" setter="set_var_name" getter="get_var_name">
The local variable's name.
</member>
</members>
<constants>

View File

@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Commonly used mathematical constants.
</brief_description>
<description>
Provides common math constants, such as Pi or Euler's constant, on an output Data port.
[b]Input Ports:[/b]
none
[b]Output Ports:[/b]
- Data (variant): [code]get[/code]
</description>
<tutorials>
</tutorials>
@ -26,24 +32,33 @@
</methods>
<members>
<member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant">
The math constant.
</member>
</members>
<constants>
<constant name="MATH_CONSTANT_ONE" value="0">
Unity: [code]1[/code]
</constant>
<constant name="MATH_CONSTANT_PI" value="1">
Pi: [code]3.141593[/code]
</constant>
<constant name="MATH_CONSTANT_2PI" value="2">
Pi times two: [code]6.283185[/code]
</constant>
<constant name="MATH_CONSTANT_HALF_PI" value="3">
Pi divided by two: [code]1.570796[/code]
</constant>
<constant name="MATH_CONSTANT_E" value="4">
Natural log: [code]2.718282[/code]
</constant>
<constant name="MATH_CONSTANT_SQRT2" value="5">
Square root of two: [code]1.414214[/code]
</constant>
<constant name="MATH_CONSTANT_INF" value="6">
Infinity: [code]inf[/code]
</constant>
<constant name="MATH_CONSTANT_NAN" value="7">
Not a number: [code]nan[/code]
</constant>
<constant name="MATH_CONSTANT_MAX" value="8">
</constant>

View File

@ -7,9 +7,7 @@
- Data (variant): [code]A[/code]
- Data (variant): [code]B[/code]
[b]Output Ports:[/b]
- Sequence: [code]true[/code]
- Sequence: [code]false[/code]
- Sequence: [code]done[/code]
- Data (variant): [code]result[/code]
</description>
<tutorials>
</tutorials>

View File

@ -1,8 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Exits a function and returns an optional value.
</brief_description>
<description>
Ends the execution of a function and returns control to the calling function. Optionally, it can return a [Variant] value.
[b]Input Ports:[/b]
- Sequence
- Data (variant): [code]result[/code] (optional)
[b]Output Ports:[/b]
none
</description>
<tutorials>
</tutorials>
@ -40,8 +47,10 @@
</methods>
<members>
<member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled">
If [code]true[/code] the [code]return[/code] input port is available.
</member>
<member name="return_type" type="int" setter="set_return_type" getter="get_return_type" enum="Variant.Type">
The return value's data type.
</member>
</members>
<constants>

View File

@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Outputs a reference to the current instance.
</brief_description>
<description>
Provides a reference to the node running the visual script.
[b]Input Ports:[/b]
none
[b]Output Ports:[/b]
- Data (object): [code]instance[/code]
</description>
<tutorials>
</tutorials>

View File

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Executes a series of Sequence ports.
</brief_description>
<description>
Steps through a series of one or more output Sequence ports. The [code]current[/code] data port outputs the currently executing item.
[b]Input Ports:[/b]
- Sequence: [code]in order[/code]
[b]Output Ports:[/b]
- Sequence: [code]1[/code]
- Sequence: [code]2 - n[/code] (optional)
- Data (int): [code]current[/code]
</description>
<tutorials>
</tutorials>
@ -26,6 +34,7 @@
</methods>
<members>
<member name="steps" type="int" setter="set_steps" getter="get_steps">
The number of steps in the sequence.
</member>
</members>
<constants>

View File

@ -1,8 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Branches program flow based on a given input's value.
</brief_description>
<description>
Branches the flow based on an input's value. Use "Case Count" in the Inspector to set the number of branches and each comparison's optional type.
[b]Input Ports:[/b]
- Sequence: [code]'input' is[/code]
- Data (variant): [code]=[/code]
- Data (variant): [code]=[/code] (optional)
- Data (variant): [code]input[/code]
[b]Output Ports:[/b]
- Sequence
- Sequence (optional)
- Sequence: [code]done[/code]
</description>
<tutorials>
</tutorials>