Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

AnimationNode

Inherits: Resource < RefCounted < Object

Inherited By: AnimationNodeOutput, AnimationNodeSync, AnimationNodeTimeScale, AnimationNodeTimeSeek, AnimationRootNode

Base class for AnimationTree nodes. Not related to scene nodes.

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 animation nodes mainly for use in AnimationNodeBlendTree, otherwise AnimationRootNode should be used instead.

Tutorials

Properties

bool

filter_enabled

Methods

String

_get_caption ( ) virtual const

AnimationNode

_get_child_by_name ( StringName name ) virtual const

Dictionary

_get_child_nodes ( ) virtual const

Variant

_get_parameter_default_value ( StringName parameter ) virtual const

Array

_get_parameter_list ( ) virtual const

bool

_has_filter ( ) virtual const

bool

_is_parameter_read_only ( StringName parameter ) virtual const

float

_process ( float time, bool seek, bool is_external_seeking, bool test_only ) virtual const

bool

add_input ( String name )

void

blend_animation ( StringName animation, float time, float delta, bool seeked, bool is_external_seeking, float blend, LoopedFlag looped_flag=0 )

float

blend_input ( int input_index, float time, bool seek, bool is_external_seeking, float blend, FilterAction filter=0, bool sync=true, bool test_only=false )

float

blend_node ( StringName name, AnimationNode node, float time, bool seek, bool is_external_seeking, float blend, FilterAction filter=0, bool sync=true, bool test_only=false )

int

find_input ( String name ) const

int

get_input_count ( ) const

String

get_input_name ( int input ) const

Variant

get_parameter ( StringName name ) const

bool

is_path_filtered ( NodePath path ) const

void

remove_input ( int index )

void

set_filter_path ( NodePath path, bool enable )

bool

set_input_name ( int input, String name )

void

set_parameter ( StringName name, Variant value )


Signals

animation_node_removed ( int object_id, String name )

Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are AnimationNodeBlendSpace1D, AnimationNodeBlendSpace2D, AnimationNodeStateMachine, and AnimationNodeBlendTree.


animation_node_renamed ( int object_id, String old_name, String new_name )

Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are AnimationNodeBlendSpace1D, AnimationNodeBlendSpace2D, AnimationNodeStateMachine, and AnimationNodeBlendTree.


tree_changed ( )

Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are AnimationNodeBlendSpace1D, AnimationNodeBlendSpace2D, AnimationNodeStateMachine, AnimationNodeBlendTree and AnimationNodeTransition.


Enumerations

enum FilterAction:

FilterAction FILTER_IGNORE = 0

Do not use filtering.

FilterAction FILTER_PASS = 1

Paths matching the filter will be allowed to pass.

FilterAction FILTER_STOP = 2

Paths matching the filter will be discarded.

FilterAction FILTER_BLEND = 3

Paths matching the filter will be blended (by the blend value).


Property Descriptions

bool filter_enabled

  • void set_filter_enabled ( bool value )

  • bool is_filter_enabled ( )

If true, filtering is enabled.


Method Descriptions

String _get_caption ( ) virtual const

When inheriting from AnimationRootNode, implement this virtual method to override the text caption for this animation node.


AnimationNode _get_child_by_name ( StringName name ) virtual const

When inheriting from AnimationRootNode, implement this virtual method to return a child animation node by its name.


Dictionary _get_child_nodes ( )