Struct AnimationNode

Base resource for AnimationTree nodes.

struct AnimationNode ;

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 AnimationNodeBlendTree, otherwise AnimationRootNode should be used instead.

Properties

NameTypeDescription
filterEnabled[get, set] boolIf true, filtering is enabled.
filters[get, set] Array

Methods

NameDescription
_getFilters
_setFilters
addInput Adds an input to the node. This is only useful for nodes created for use in an AnimationNodeBlendTree.
blendAnimation Blend an animation by blend amount (name must be valid in the linked AnimationPlayer). A time and delta may be passed, as well as whether seek happened.
blendInput Blend an input. This is only useful for nodes created for an AnimationNodeBlendTree. The time parameter is a relative delta, unless seek is true, in which case it is absolute. A filter mode may be optionally passed (see filteraction for options).
blendNode Blend another animation 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.
getCaption Gets the text caption for this node (used by some editors).
getChildByName Gets a child node by index (used by editors inheriting from AnimationRootNode).
getChildNodes Gets all children nodes in order as a name: node dictionary. Only useful when inheriting AnimationRootNode.
getInputCount Amount of inputs in this node, only useful for nodes that go into AnimationNodeBlendTree.
getInputName Gets the name of an input by index.
getParameter Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
getParameterDefaultValue 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.
getParameterList 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 GodotObject.getPropertyList.
hasFilter Returns true whether you want the blend tree editor to display filter editing on this node.
isFilterEnabled
isPathFiltered Returns true whether a given path is filtered.
process User-defined callback called when a custom node is processed. The time parameter is a relative delta, unless seek is true, in which case it is absolute. Here, call the blendInput, blendNode or blendAnimation functions. You can also use getParameter and setParameter 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).
removeInput Removes an input, call this only when inactive.
setFilterEnabled
setFilterPath Adds or removes a path for the filter.
setParameter Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes.

Enums

NameDescription
Constants
FilterAction