Struct AnimationTreePlayer

Animation player that uses a node graph for blending animations.

struct AnimationTreePlayer ;

A node graph tool for blending multiple animations bound to an AnimationPlayer. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. It takes Animations from an AnimationPlayer node and mixes them depending on the graph.

Properties

NameTypeDescription
active[get, set] boolIf true, the AnimationTreePlayer is able to play animations.
basePath[get, set] NodePathThe node from which to relatively access other nodes. It accesses the bones, so it should point to the same node the AnimationPlayer would point its Root Node at.
masterPlayer[get, set] NodePathThe path to the AnimationPlayer from which this AnimationTreePlayer binds animations to animation nodes. Once set, Animation nodes can be added to the AnimationTreePlayer.
playbackProcessMode[get, set] AnimationTreePlayer.AnimationProcessModeThe thread in which to update animations.

Methods

NameDescription
addNode Adds a type node to the graph with name id.
advance Shifts position in the animation timeline. delta is the time in seconds to shift. Events between the current frame and delta are handled.
animationNodeGetAnimation Returns the AnimationPlayer's Animation bound to the AnimationTreePlayer's animation node with name id.
animationNodeGetMasterAnimation Returns the name of the masterPlayer's Animation bound to this animation node.
animationNodeGetPosition Returns the absolute playback timestamp of the animation node with name id.
animationNodeSetAnimation Binds a new Animation from the masterPlayer to the AnimationTreePlayer's animation node with name id.
animationNodeSetFilterPath If enable is true, the animation node with ID id turns off the track modifying the property at path. The modified node's children continue to animate.
animationNodeSetMasterAnimation Binds the Animation named source from masterPlayer to the animation node id. Recalculates caches.
areNodesConnected Returns whether node id and dst_id are connected at the specified slot.
blend2NodeGetAmount Returns the blend amount of a Blend2 node given its name.
blend2NodeSetAmount Sets the blend amount of a Blend2 node given its name and value. A Blend2 node blends two animations (A and B) with the amount between 0 and 1. At 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B.
blend2NodeSetFilterPath If enable is true, the Blend2 node with name id turns off the track modifying the property at path. The modified node's children continue to animate.
blend3NodeGetAmount Returns the blend amount of a Blend3 node given its name.
blend3NodeSetAmount Sets the blend amount of a Blend3 node given its name and value. A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1. At -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+.
blend4NodeGetAmount Returns the blend amount of a Blend4 node given its name.
blend4NodeSetAmount Sets the blend amount of a Blend4 node given its name and value. A Blend4 Node blends two pairs of animations. The two pairs are blended like Blend2 and then added together.
connectNodes Connects node id to dst_id at the specified input slot.
disconnectNodes Disconnects nodes connected to id at the specified input slot.
getAnimationProcessMode
getBasePath
getMasterPlayer
getNodeList Returns a PoolStringArray containing the name of all nodes.
isActive
mixNodeGetAmount Returns the mix amount of a Mix node given its name.
mixNodeSetAmount Sets the mix amount of a Mix node given its name and value. A Mix node adds input b to input a by the amount given by ratio.
nodeExists Check if a node exists (by name).
nodeGetInputCount Returns the input count for a given node. Different types of nodes have different amount of inputs.
nodeGetInputSource Returns the input source for a given node input.
nodeGetPosition Returns position of a node in the graph given its name.
nodeGetType Gets the node type, will return from nodetype enum.
nodeRename Renames a node in the graph.
nodeSetPosition Sets the position of a node in the graph given its name and position.
oneshotNodeGetAutorestartDelay Returns the autostart delay of a OneShot node given its name.
oneshotNodeGetAutorestartRandomDelay Returns the autostart random delay of a OneShot node given its name.
oneshotNodeGetFadeinTime Returns the fade in time of a OneShot node given its name.
oneshotNodeGetFadeoutTime Returns the fade out time of a OneShot node given its name.
oneshotNodeHasAutorestart Returns whether a OneShot node will auto restart given its name.
oneshotNodeIsActive Returns whether a OneShot node is active given its name.
oneshotNodeSetAutorestart Sets the autorestart property of a OneShot node given its name and value.
oneshotNodeSetAutorestartDelay Sets the autorestart delay of a OneShot node given its name and value in seconds.
oneshotNodeSetAutorestartRandomDelay Sets the autorestart random delay of a OneShot node given its name and value in seconds.
oneshotNodeSetFadeinTime Sets the fade in time of a OneShot node given its name and value in seconds.
oneshotNodeSetFadeoutTime Sets the fade out time of a OneShot node given its name and value in seconds.
oneshotNodeSetFilterPath If enable is true, the OneShot node with ID id turns off the track modifying the property at path. The modified node's children continue to animate.
oneshotNodeStart Starts a OneShot node given its name.
oneshotNodeStop Stops the OneShot node with name id.
recomputeCaches Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
removeNode Removes the animation node with name id.
reset Resets this AnimationTreePlayer.
setActive
setAnimationProcessMode
setBasePath
setMasterPlayer
timescaleNodeGetScale Returns the time scale value of the TimeScale node with name id.
timescaleNodeSetScale Sets the time scale of the TimeScale node with name id to scale. The TimeScale node is used to speed Animations up if the scale is above 1 or slow them down if it is below 1. If applied after a blend or mix, affects all input animations to that blend or mix.
timeseekNodeSeek Sets the time seek value of the TimeSeek node with name id to seconds. This functions as a seek in the Animation or the blend or mix of Animations input in it.
transitionNodeDeleteInput Deletes the input at input_idx for the transition node with name id.
transitionNodeGetCurrent Returns the index of the currently evaluated input for the transition node with name id.
transitionNodeGetInputCount Returns the number of inputs for the transition node with name id. You can add inputs by right-clicking on the transition node.
transitionNodeGetXfadeTime Returns the cross fade time for the transition node with name id.
transitionNodeHasInputAutoAdvance Returns true if the input at input_idx on the transition node with name id is set to automatically advance to the next input upon completion.
transitionNodeSetCurrent The transition node with name id sets its current input at input_idx.
transitionNodeSetInputAutoAdvance The transition node with name id advances to its next input automatically when the input at input_idx completes.
transitionNodeSetInputCount Resizes the number of inputs available for the transition node with name id.
transitionNodeSetXfadeTime The transition node with name id sets its cross fade time to time_sec.

Enums

NameDescription
AnimationProcessMode
Constants
NodeType