AnimationNode
Inherited By: , AnimationNodeAdd3, , AnimationNodeBlend3, , AnimationNodeOutput, , AnimationNodeTimeSeek, , AnimationRootNode
Category: Core
Base resource for nodes.
Properties
Signals
- removed_from_graph ( )
Called when the node was removed from the graph.
- tree_changed ( )
Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are AnimationNodeBlendSpace1D, , AnimationNodeStateMachine, and .
enum FilterAction:
- FILTER_PASS = 1 — Paths matching the filter will be allowed to pass.
- FILTER_STOP = 2 — Paths matching the filter will be discarded.
- FILTER_BLEND = 3 — Paths matching the filter will be blended (by the blend value).
Description
Base resource for AnimationTree nodes. In general it’s not used directly but you can create custom ones with custom blending formulas.
Inherit this when creating nodes mainly for use in , otherwise AnimationRootNode should be used instead.
- filter_enabled
Returns whether filtering is enabled.
Method Descriptions
- void add_input ( String name )
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.
- blend_input ( int input_index, time, bool seek, blend, FilterAction filter=0, optimize=true )
Blend an input. This is only useful for nodes created for an AnimationNodeBlendTree. Time is a delta, unless “seek” is , in which case it is absolute. A filter mode may be optionally passed.
Blend another animaiton node (in case this node contains children animation nodes). This function is only useful if you inherit from instead, else editors will not display your node for addition.
- String get_caption ( ) virtual
Get the text caption for this node (used by some editors)
- get_child_by_name ( String name ) virtual
Get the a child node by index (used by editors inheriting from ).
Get all children nodes, in order as a name:node dictionary. Only useful when inheriting AnimationRootNode.
- get_input_count ( ) const
Amount of inputs in this node, only useful for nodes that go into AnimationNodeBlendTree.
- get_input_name ( int input )
Get the name of an input by index.
- get_parameter ( String name ) const
Get the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
- get_parameter_default_value ( String name ) virtual
- get_parameter_list ( ) virtual
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 Object.get_property_list.
- has_filter ( ) virtual
Returns whether you want the blend tree editor to display filter editing on this node.
- bool is_path_filtered ( path ) const
Returns whether a given path is filtered.
- void process ( float time, seek ) virtual
Called when a custom node is processed. The argument “time” is relative, unless “seek” is (in which case it is absolute).
Here, call the blend_input, or blend_animation functions.
You can also use and 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).
- void remove_input ( index )
Remove an input, call this only when inactive.
- void set_filter_path ( NodePath path, enable )
Add/Remove a path for the filter.