2018-07-26 09:56:21 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-07-05 09:32:53 +00:00
<class name= "AnimationNode" inherits= "Resource" category= "Core" version= "3.1.2" >
2018-07-26 09:56:21 +00:00
<brief_description >
2018-11-26 10:21:06 +00:00
Base resource for [AnimationTree] nodes.
2018-07-26 09:56:21 +00:00
</brief_description>
<description >
2018-11-26 10:21:06 +00:00
Base resource for [AnimationTree] nodes. In general it's not used directly but you can create custom ones with custom blending formulas.
2018-11-25 19:56:49 +00:00
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
2018-07-26 09:56:21 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_input" >
<return type= "void" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Add an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree]
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "blend_animation" >
<return type= "void" >
</return>
<argument index= "0" name= "animation" type= "String" >
</argument>
<argument index= "1" name= "time" type= "float" >
</argument>
<argument index= "2" name= "delta" type= "float" >
</argument>
<argument index= "3" name= "seeked" type= "bool" >
</argument>
<argument index= "4" name= "blend" type= "float" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Blend an animation by "blend" amount (name must be valid in the linked [AnimationPlayer]). A time and delta mas be passed, as well as whether seek happened.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "blend_input" >
<return type= "float" >
</return>
<argument index= "0" name= "input_index" type= "int" >
</argument>
<argument index= "1" name= "time" type= "float" >
</argument>
<argument index= "2" name= "seek" type= "bool" >
</argument>
<argument index= "3" name= "blend" type= "float" >
</argument>
<argument index= "4" name= "filter" type= "int" enum= "AnimationNode.FilterAction" default= "0" >
</argument>
<argument index= "5" name= "optimize" type= "bool" default= "true" >
</argument>
<description >
2019-04-17 11:42:56 +00:00
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "blend_node" >
<return type= "float" >
</return>
2018-08-20 22:35:30 +00:00
<argument index= "0" name= "name" type= "String" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "1" name= "node" type= "AnimationNode" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "2" name= "time" type= "float" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "3" name= "seek" type= "bool" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "4" name= "blend" type= "float" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "5" name= "filter" type= "int" enum= "AnimationNode.FilterAction" default= "0" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "6" name= "optimize" type= "bool" default= "true" >
2018-07-26 09:56:21 +00:00
</argument>
<description >
2018-11-26 10:21:06 +00:00
Blend another animaiton node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
2018-07-26 09:56:21 +00:00
</description>
</method>
2018-08-20 22:35:30 +00:00
<method name= "get_caption" qualifiers= "virtual" >
2018-07-26 09:56:21 +00:00
<return type= "String" >
</return>
<description >
2018-11-26 10:21:06 +00:00
Get the text caption for this node (used by some editors)
2018-11-25 19:56:49 +00:00
</description>
</method>
<method name= "get_child_by_name" qualifiers= "virtual" >
<return type= "Object" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Get the a child node by index (used by editors inheriting from [AnimationRootNode]).
2018-11-25 19:56:49 +00:00
</description>
</method>
<method name= "get_child_nodes" qualifiers= "virtual" >
<return type= "Dictionary" >
</return>
<description >
2018-11-26 10:21:06 +00:00
Get all children nodes, in order as a name:node dictionary. Only useful when inheriting [AnimationRootNode].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_input_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-01-07 09:02:04 +00:00
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_input_name" >
<return type= "String" >
</return>
<argument index= "0" name= "input" type= "int" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Get the name of an input by index.
2018-07-26 09:56:21 +00:00
</description>
</method>
2018-08-20 22:35:30 +00:00
<method name= "get_parameter" qualifiers= "const" >
<return type= "Variant" >
2018-07-26 09:56:21 +00:00
</return>
2018-08-20 22:35:30 +00:00
<argument index= "0" name= "name" type= "String" >
</argument>
2018-07-26 09:56:21 +00:00
<description >
2018-11-26 10:21:06 +00:00
Get the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
2018-11-25 19:56:49 +00:00
</description>
</method>
<method name= "get_parameter_default_value" qualifiers= "virtual" >
<return type= "Variant" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Get the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
2018-11-25 19:56:49 +00:00
</description>
</method>
<method name= "get_parameter_list" qualifiers= "virtual" >
<return type= "Array" >
</return>
<description >
2019-01-07 09:02:04 +00:00
Get 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].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "has_filter" qualifiers= "virtual" >
<return type= "String" >
</return>
<description >
2019-04-17 11:42:56 +00:00
Return [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "is_path_filtered" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "path" type= "NodePath" >
</argument>
<description >
2019-04-17 11:42:56 +00:00
Return [code]true[/code] wether a given path is filtered.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "process" qualifiers= "virtual" >
<return type= "void" >
</return>
<argument index= "0" name= "time" type= "float" >
</argument>
<argument index= "1" name= "seek" type= "bool" >
</argument>
<description >
2019-04-17 11:42:56 +00:00
Called when a custom node is processed. The argument "time" is relative, unless "seek" is [code]true[/code] (in which case it is absolute).
2018-11-25 19:56:49 +00:00
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 returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called).
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "remove_input" >
<return type= "void" >
</return>
<argument index= "0" name= "index" type= "int" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Remove an input, call this only when inactive.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "set_filter_path" >
<return type= "void" >
</return>
<argument index= "0" name= "path" type= "NodePath" >
</argument>
<argument index= "1" name= "enable" type= "bool" >
</argument>
<description >
2018-11-26 10:21:06 +00:00
Add/Remove a path for the filter.
2018-07-26 09:56:21 +00:00
</description>
</method>
2018-08-20 22:35:30 +00:00
<method name= "set_parameter" >
2018-07-26 09:56:21 +00:00
<return type= "void" >
</return>
2018-08-20 22:35:30 +00:00
<argument index= "0" name= "name" type= "String" >
2018-07-26 09:56:21 +00:00
</argument>
2018-08-20 22:35:30 +00:00
<argument index= "1" name= "value" type= "Variant" >
2018-07-26 09:56:21 +00:00
</argument>
<description >
2018-11-26 10:21:06 +00:00
Set a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes.
2018-07-26 09:56:21 +00:00
</description>
</method>
</methods>
<members >
<member name= "filter_enabled" type= "bool" setter= "set_filter_enabled" getter= "is_filter_enabled" >
2018-11-26 10:21:06 +00:00
Return whether filtering is enabled.
2018-07-26 09:56:21 +00:00
</member>
</members>
<signals >
<signal name= "removed_from_graph" >
<description >
2018-11-26 10:21:06 +00:00
Called when the node was removed from the graph.
2018-07-26 09:56:21 +00:00
</description>
</signal>
2018-08-20 22:35:30 +00:00
<signal name= "tree_changed" >
<description >
</description>
</signal>
2018-07-26 09:56:21 +00:00
</signals>
<constants >
<constant name= "FILTER_IGNORE" value= "0" enum= "FilterAction" >
2018-11-26 10:21:06 +00:00
Do not use filtering.
2018-07-26 09:56:21 +00:00
</constant>
<constant name= "FILTER_PASS" value= "1" enum= "FilterAction" >
2018-11-26 10:21:06 +00:00
Paths matching the filter will be allowed to pass.
2018-07-26 09:56:21 +00:00
</constant>
<constant name= "FILTER_STOP" value= "2" enum= "FilterAction" >
2018-11-26 10:21:06 +00:00
Paths matching the filter will be discarded.
2018-07-26 09:56:21 +00:00
</constant>
<constant name= "FILTER_BLEND" value= "3" enum= "FilterAction" >
2018-11-26 10:21:06 +00:00
Paths matching the filter will be blended (by the blend value).
2018-07-26 09:56:21 +00:00
</constant>
</constants>
</class>