AnimationNode
Base class for AnimationTree nodes. Not related to scene nodes.
Base class for AnimationTree nodes. Not related to scene nodes.
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.
You can access the time information as read-only parameter which is processed and stored in the previous frame for all nodes except AnimationNodeOutput.
Note: If multiple inputs exist in the AnimationNode, which time information takes precedence depends on the type of AnimationNode.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AnimationNodeConstructor
public AnimationNode();Properties2
FilterEnabledProperty
public bool FilterEnabled { get; set; }If true, filtering is enabled.
FiltersProperty
public Reckfell.Collections.Array Filters { get; set; }Methods27
AddInputbool
public bool AddInput(string name);Adds an input to the animation node. This is only useful for animation nodes created for use in an AnimationNodeBlendTree. If the addition fails, returns false.
| Name | Type | Default |
|---|---|---|
name | string | — |
boolBlendAnimationvoid
public void BlendAnimation(StringName animation, double time, double delta, bool seeked, bool isExternalSeeking, float blend, Animation.LoopedFlag loopedFlag = Animation.LoopedFlag.None);Blends an animation by blend amount (name must be valid in the linked AnimationPlayer). A time and delta may be passed, as well as whether seeked happened.
A looped_flag is used by internal processing immediately after the loop.
| Name | Type | Default |
|---|---|---|
animation | StringName | — |
time | double | — |
delta | double | — |
seeked | bool | — |
isExternalSeeking | bool | — |
blend | float | — |
loopedFlag | Animation.LoopedFlag | Animation.LoopedFlag.None |
BlendInput2 overloads
public double BlendInput(int inputIndex, double time, bool seek, bool isExternalSeeking, float blend, AnimationNode.FilterAction filter, bool sync);Blends an input. This is only useful for animation 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.
| Name | Type | Default |
|---|---|---|
inputIndex | int | — |
time | double | — |
seek | bool | — |
isExternalSeeking | bool | — |
blend | float | — |
filter | AnimationNode.FilterAction | — |
sync | bool | — |
doublepublic double BlendInput(int inputIndex, double time, bool seek, bool isExternalSeeking, float blend, AnimationNode.FilterAction filter = AnimationNode.FilterAction.Ignore, bool sync = true, bool testOnly = false);Blends an input. This is only useful for animation 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.
| Name | Type | Default |
|---|---|---|
inputIndex | int | — |
time | double | — |
seek | bool | — |
isExternalSeeking | bool | — |
blend | float | — |
filter | AnimationNode.FilterAction | AnimationNode.FilterAction.Ignore |
sync | bool | true |
testOnly | bool | false |
doubleBlendNode2 overloads
public double BlendNode(StringName name, AnimationNode node, double time, bool seek, bool isExternalSeeking, float blend, AnimationNode.FilterAction filter, bool sync);Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from AnimationRootNode instead, otherwise editors will not display your animation node for addition.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
node | AnimationNode | — |
time | double | — |
seek | bool | — |
isExternalSeeking | bool | — |
blend | float | — |
filter | AnimationNode.FilterAction | — |
sync | bool | — |
doublepublic double BlendNode(StringName name, AnimationNode node, double time, bool seek, bool isExternalSeeking, float blend, AnimationNode.FilterAction filter = AnimationNode.FilterAction.Ignore, bool sync = true, bool testOnly = false);Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from AnimationRootNode instead, otherwise editors will not display your animation node for addition.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
node | AnimationNode | — |
time | double | — |
seek | bool | — |
isExternalSeeking | bool | — |
blend | float | — |
filter | AnimationNode.FilterAction | AnimationNode.FilterAction.Ignore |
sync | bool | true |
testOnly | bool | false |
doubleFindInputint
public int FindInput(string name);Returns the input index which corresponds to name. If not found, returns -1.
| Name | Type | Default |
|---|---|---|
name | string | — |
intGetInputCountint
public int GetInputCount();Amount of inputs in this animation node, only useful for animation nodes that go into AnimationNodeBlendTree.
intGetInputNamestring
public string GetInputName(int input);Gets the name of an input by index.
| Name | Type | Default |
|---|---|---|
input | int | — |
stringGetParameterVariant
public Variant GetParameter(StringName name);Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
VariantGetProcessingAnimationTreeInstanceIdulong
public ulong GetProcessingAnimationTreeInstanceId();Returns the object id of the AnimationTree that owns this node.
Note: This method should only be called from within the AnimationNodeExtension._ProcessAnimationNode method, and will return an invalid id otherwise.
ulongIsFilterEnabledbool
public bool IsFilterEnabled();boolIsPathFilteredbool
public bool IsPathFiltered(EntityPath path);Returns true if the given path is filtered.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
boolIsProcessTestingbool
public bool IsProcessTesting();Returns true if this animation node is being processed in test-only mode.
boolRemoveInputvoid
public void RemoveInput(int index);Removes an input, call this only when inactive.
| Name | Type | Default |
|---|---|---|
index | int | — |
SetFilterEnabledvoid
public void SetFilterEnabled(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetFilterPathvoid
public void SetFilterPath(EntityPath path, bool enable);Adds or removes a path for the filter.
| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
enable | bool | — |
SetInputNamebool
public bool SetInputName(int input, string name);Sets the name of the input at the given input index. If the setting fails, returns false.
| Name | Type | Default |
|---|---|---|
input | int | — |
name | string | — |
boolSetParametervoid
public void SetParameter(StringName name, Variant value);Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
value | Variant | — |
_GetCaptionstring
public virtual string _GetCaption();When inheriting from AnimationRootNode, implement this virtual method to override the text caption for this animation node.
string_GetChildByNameAnimationNode
public virtual AnimationNode _GetChildByName(StringName name);When inheriting from AnimationRootNode, implement this virtual method to return a child animation node by its name.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
AnimationNode_GetChildNodesReckfell.Collections.Dictionary
public virtual Reckfell.Collections.Dictionary _GetChildNodes();When inheriting from AnimationRootNode, implement this virtual method to return all child animation nodes in order as a name: node dictionary.
Reckfell.Collections.Dictionary_GetParameterDefaultValueVariant
public virtual Variant _GetParameterDefaultValue(StringName parameter);When inheriting from AnimationRootNode, implement this virtual method to return the default value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.
| Name | Type | Default |
|---|---|---|
parameter | StringName | — |
Variant_GetParameterListReckfell.Collections.Array
public virtual Reckfell.Collections.Array _GetParameterList();When inheriting from AnimationRootNode, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to ReckfellObject.GetPropertyList.
Reckfell.Collections.Array_HasFilterbool
public virtual bool _HasFilter();When inheriting from AnimationRootNode, implement this virtual method to return whether the blend tree editor should display filter editing on this animation node.
bool_IsParameterReadOnlybool
public virtual bool _IsParameterReadOnly(StringName parameter);When inheriting from AnimationRootNode, implement this virtual method to return whether the parameter is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.
| Name | Type | Default |
|---|---|---|
parameter | StringName | — |
bool_Processdouble · Deprecated
public virtual double _Process(double time, bool seek, bool isExternalSeeking, bool testOnly);When inheriting from AnimationRootNode, implement this virtual method to run some code when this animation node is processed. The time parameter is a relative delta, unless seek is true, in which case it is absolute.
Here, call the AnimationNode.BlendInput, AnimationNode.BlendNode or AnimationNode.BlendAnimation functions. You can also use AnimationNode.GetParameter and AnimationNode.SetParameter to modify local memory.
This function should return the delta.
| Name | Type | Default |
|---|---|---|
time | double | — |
seek | bool | — |
isExternalSeeking | bool | — |
testOnly | bool | — |
doubleSignals and events4
AnimationEntityRemovedEvent
public event AnimationNode.AnimationEntityRemovedEventHandler AnimationEntityRemoved;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.
| Name | Type | Default |
|---|---|---|
objectId | long | — |
nodeName | string | — |
AnimationEntityRenamedEvent
public event AnimationNode.AnimationEntityRenamedEventHandler AnimationEntityRenamed;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.
| Name | Type | Default |
|---|---|---|
objectId | long | — |
oldName | string | — |
newName | string | — |
NodeUpdatedEvent
public event AnimationNode.NodeUpdatedEventHandler NodeUpdated;Emitted by AnimationNodeAnimation when its AnimationNodeAnimation.Animation resource is changed, or by AnimationNodeBlendTree when its connections change.
| Name | Type | Default |
|---|---|---|
objectId | long | — |
TreeChangedEvent
public event Action TreeChanged;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.
AnimationNode.FilterAction
| Value | Description |
|---|---|
Blend = 3 | Paths matching the filter will be blended (by the blend value). |
Ignore = 0 | Do not use filtering. |
Pass = 1 | Paths matching the filter will be allowed to pass. |
Stop = 2 | Paths matching the filter will be discarded. |