summaryrefslogtreecommitdiff
path: root/modules/visual_script/doc_classes
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script/doc_classes')
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml134
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml16
2 files changed, 59 insertions, 91 deletions
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 088d84d2ec..5112ea43a7 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -26,23 +26,23 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
+ <argument index="1" name="func_node_id" type="int">
+ </argument>
<description>
- Add a function with the specified name to the VisualScript.
+ Add a function with the specified name to the VisualScript, and assign the root [VisualScriptFunction] node's id as [code]func_node_id[/code].
</description>
</method>
<method name="add_node">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
- <argument index="2" name="node" type="VisualScriptNode">
+ <argument index="1" name="node" type="VisualScriptNode">
</argument>
- <argument index="3" name="position" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
- Add a node to a function of the VisualScript.
+ Add a node to the VisualScript.
</description>
</method>
<method name="add_variable">
@@ -157,15 +157,13 @@
<method name="data_connect">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="2" name="from_port" type="int">
+ <argument index="1" name="from_port" type="int">
</argument>
- <argument index="3" name="to_node" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
- <argument index="4" name="to_port" type="int">
+ <argument index="3" name="to_port" type="int">
</argument>
<description>
Connect two data ports. The value of [code]from_node[/code]'s [code]from_port[/code] would be fed into [code]to_node[/code]'s [code]to_port[/code].
@@ -174,15 +172,13 @@
<method name="data_disconnect">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="1" name="from_port" type="int">
</argument>
- <argument index="2" name="from_port" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
- <argument index="3" name="to_node" type="int">
- </argument>
- <argument index="4" name="to_port" type="int">
+ <argument index="3" name="to_port" type="int">
</argument>
<description>
Disconnect two data ports previously connected with [method data_connect].
@@ -197,37 +193,31 @@
Returns the id of a function's entry point node.
</description>
</method>
- <method name="get_function_scroll" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="name" type="StringName">
- </argument>
- <description>
- Returns the position of the center of the screen for a given function.
- </description>
- </method>
<method name="get_node" qualifiers="const">
<return type="VisualScriptNode">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
- Returns a node given its id and its function.
+ Returns a node given its id.
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
Returns a node's position in pixels.
</description>
</method>
+ <method name="get_scroll" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the current position of the center of the screen.
+ </description>
+ </method>
<method name="get_variable_default_value" qualifiers="const">
<return type="Variant">
</return>
@@ -267,15 +257,13 @@
<method name="has_data_connection" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="2" name="from_port" type="int">
+ <argument index="1" name="from_port" type="int">
</argument>
- <argument index="3" name="to_node" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
- <argument index="4" name="to_port" type="int">
+ <argument index="3" name="to_port" type="int">
</argument>
<description>
Returns whether the specified data ports are connected.
@@ -293,9 +281,7 @@
<method name="has_node" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
Returns whether a node exists with the given id.
@@ -304,13 +290,11 @@
<method name="has_sequence_connection" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="2" name="from_output" type="int">
+ <argument index="1" name="from_output" type="int">
</argument>
- <argument index="3" name="to_node" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
<description>
Returns whether the specified sequence ports are connected.
@@ -346,12 +330,10 @@
<method name="remove_node">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
- Remove a specific node.
+ Remove the node with the specified id.
</description>
</method>
<method name="remove_variable">
@@ -399,13 +381,11 @@
<method name="sequence_connect">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="1" name="from_output" type="int">
</argument>
- <argument index="2" name="from_output" type="int">
- </argument>
- <argument index="3" name="to_node" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
<description>
Connect two sequence ports. The execution will flow from of [code]from_node[/code]'s [code]from_output[/code] into [code]to_node[/code].
@@ -415,29 +395,16 @@
<method name="sequence_disconnect">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
- </argument>
- <argument index="1" name="from_node" type="int">
+ <argument index="0" name="from_node" type="int">
</argument>
- <argument index="2" name="from_output" type="int">
+ <argument index="1" name="from_output" type="int">
</argument>
- <argument index="3" name="to_node" type="int">
+ <argument index="2" name="to_node" type="int">
</argument>
<description>
Disconnect two sequence ports previously connected with [method sequence_connect].
</description>
</method>
- <method name="set_function_scroll">
- <return type="void">
- </return>
- <argument index="0" name="name" type="StringName">
- </argument>
- <argument index="1" name="ofs" type="Vector2">
- </argument>
- <description>
- Position the center of the screen for a function.
- </description>
- </method>
<method name="set_instance_base_type">
<return type="void">
</return>
@@ -450,14 +417,21 @@
<method name="set_node_position">
<return type="void">
</return>
- <argument index="0" name="func" type="StringName">
+ <argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="id" type="int">
+ <argument index="1" name="position" type="Vector2">
</argument>
- <argument index="2" name="position" type="Vector2">
+ <description>
+ Set the node position in the VisualScript graph.
+ </description>
+ </method>
+ <method name="set_scroll">
+ <return type="void">
+ </return>
+ <argument index="0" name="ofs" type="Vector2">
</argument>
<description>
- Position a node on the screen.
+ Set the screen center to the given position.
</description>
</method>
<method name="set_variable_default_value">
@@ -496,9 +470,7 @@
</methods>
<signals>
<signal name="node_ports_changed">
- <argument index="0" name="function" type="String">
- </argument>
- <argument index="1" name="id" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
Emitted when the ports of a node are changed.
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 000fbd0140..219ffd01d3 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -92,7 +92,7 @@
<constant name="MATH_STEP_DECIMALS" value="24" enum="BuiltinFunc">
Return the number of digit places after the decimal that the first non-zero digit occurs.
</constant>
- <constant name="MATH_STEPIFY" value="25" enum="BuiltinFunc">
+ <constant name="MATH_SNAPPED" value="25" enum="BuiltinFunc">
Return the input snapped to a given step.
</constant>
<constant name="MATH_LERP" value="26" enum="BuiltinFunc">
@@ -202,24 +202,20 @@
<constant name="BYTES_TO_VAR" value="62" enum="BuiltinFunc">
Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES].
</constant>
- <constant name="COLORN" value="63" enum="BuiltinFunc">
- Return the [Color] with the given name and alpha ranging from 0 to 1.
- [b]Note:[/b] Names are defined in [code]color_names.inc[/code].
- </constant>
- <constant name="MATH_SMOOTHSTEP" value="64" enum="BuiltinFunc">
+ <constant name="MATH_SMOOTHSTEP" value="63" enum="BuiltinFunc">
Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula:
[codeblock]
var t = clamp((weight - from) / (to - from), 0.0, 1.0)
return t * t * (3.0 - 2.0 * t)
[/codeblock]
</constant>
- <constant name="MATH_POSMOD" value="65" enum="BuiltinFunc">
+ <constant name="MATH_POSMOD" value="64" enum="BuiltinFunc">
</constant>
- <constant name="MATH_LERP_ANGLE" value="66" enum="BuiltinFunc">
+ <constant name="MATH_LERP_ANGLE" value="65" enum="BuiltinFunc">
</constant>
- <constant name="TEXT_ORD" value="67" enum="BuiltinFunc">
+ <constant name="TEXT_ORD" value="66" enum="BuiltinFunc">
</constant>
- <constant name="FUNC_MAX" value="68" enum="BuiltinFunc">
+ <constant name="FUNC_MAX" value="67" enum="BuiltinFunc">
Represents the size of the [enum BuiltinFunc] enum.
</constant>
</constants>