Skip to content

Commit

Permalink
Merge pull request #64344 from asmaloney/doc-animation-node-virtuals
Browse files Browse the repository at this point in the history
[doc] Clarify that AnimationNode virtual methods need to be implemented rather than called directly
  • Loading branch information
mhilbrunner authored Aug 17, 2022
2 parents 736e3b7 + f52128e commit dbd1524
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/classes/AnimationNode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,39 @@
<method name="_get_caption" qualifiers="virtual const">
<return type="String" />
<description>
Gets the text caption for this node (used by some editors).
When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node.
</description>
</method>
<method name="_get_child_by_name" qualifiers="virtual const">
<return type="AnimationNode" />
<param index="0" name="name" type="StringName" />
<description>
Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [param name].
</description>
</method>
<method name="_get_child_nodes" qualifiers="virtual const">
<return type="Dictionary" />
<description>
Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary.
</description>
</method>
<method name="_get_parameter_default_value" qualifiers="virtual const">
<return type="Variant" />
<param index="0" name="parameter" type="StringName" />
<description>
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
When inheriting from [AnimationRootNode], implement this virtual method to return the default value of a [param parameter]. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
<method name="_get_parameter_list" qualifiers="virtual const">
<return type="Array" />
<description>
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
</description>
</method>
<method name="_has_filter" qualifiers="virtual const">
<return type="bool" />
<description>
Returns whether you want the blend tree editor to display filter editing on this node.
When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node.
</description>
</method>
<method name="_process" qualifiers="virtual const">
Expand All @@ -55,7 +55,7 @@
<param index="1" name="seek" type="bool" />
<param index="2" name="seek_root" type="bool" />
<description>
User-defined callback called when a custom node is processed. The [param time] parameter is a relative delta, unless [param seek] is [code]true[/code], in which case it is absolute.
When inheriting from [AnimationRootNode], implement this virtual method to run some code when this node is processed. The [param time] parameter is a relative delta, unless [param seek] is [code]true[/code], in which case it is absolute.
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
</description>
Expand Down

0 comments on commit dbd1524

Please sign in to comment.