AnimationTreePlayer

Animation Player that uses a node graph for blending Animations.

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.

@GodotBaseClass
struct AnimationTreePlayer {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

AnimationProcessMode
enum AnimationProcessMode
Constants
enum Constants
NodeType
enum NodeType

Functions

addNode
void addNode(long type, StringArg1 id)

Adds a type node to the graph with name id.

advance
void advance(double delta)

Shifts position in the animation timeline. Delta is the time in seconds to shift.

animationNodeGetAnimation
Ref!Animation animationNodeGetAnimation(StringArg0 id)

Returns the AnimationPlayer's Animation bound to the AnimationTreePlayer's animation node with name id.

animationNodeGetMasterAnimation
String animationNodeGetMasterAnimation(StringArg0 id)

Returns the name of the masterPlayer's Animation bound to this animation node.

animationNodeGetPosition
double animationNodeGetPosition(StringArg0 id)
animationNodeSetAnimation
void animationNodeSetAnimation(StringArg0 id, Animation animation)

Binds a new Animation from the masterPlayer to the AnimationTreePlayer's animation node with name id.

animationNodeSetFilterPath
void animationNodeSetFilterPath(StringArg0 id, NodePathArg1 path, bool enable)

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
void animationNodeSetMasterAnimation(StringArg0 id, StringArg1 source)

Binds the Animation named source from masterPlayer to the animation node id. Recalculates caches.

areNodesConnected
bool areNodesConnected(StringArg0 id, StringArg1 dst_id, long dst_input_idx)

Returns whether node id and dst_id are connected at the specified slot.

blend2NodeGetAmount
double blend2NodeGetAmount(StringArg0 id)

Returns the blend amount of a Blend2 node given its name.

blend2NodeSetAmount
void blend2NodeSetAmount(StringArg0 id, double blend)

Sets the blend amount of a Blend2 node given its name and value. A Blend2 Node blends two animations 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
void blend2NodeSetFilterPath(StringArg0 id, NodePathArg1 path, bool enable)

If enable is true, the blend2 node with ID id turns off the track modifying the property at path. The modified node's children continue to animate.

blend3NodeGetAmount
double blend3NodeGetAmount(StringArg0 id)

Returns the blend amount of a Blend3 node given its name.

blend3NodeSetAmount
void blend3NodeSetAmount(StringArg0 id, double blend)

Sets the blend amount of a Blend3 node given its name and value. A Blend3 Node blends three animations 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
Vector2 blend4NodeGetAmount(StringArg0 id)

Returns the blend amount of a Blend4 node given its name.

blend4NodeSetAmount
void blend4NodeSetAmount(StringArg0 id, Vector2 blend)

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
GodotError connectNodes(StringArg0 id, StringArg1 dst_id, long dst_input_idx)

Connects node id to dst_id at the specified input slot.

disconnectNodes
void disconnectNodes(StringArg0 id, long dst_input_idx)

Disconnects nodes connected to id at the specified input slot.

getAnimationProcessMode
AnimationTreePlayer.AnimationProcessMode getAnimationProcessMode()
getBasePath
NodePath getBasePath()
getMasterPlayer
NodePath getMasterPlayer()
getNodeList
PoolStringArray getNodeList()

Returns a PoolStringArray containing the name of all nodes.

isActive
bool isActive()
mixNodeGetAmount
double mixNodeGetAmount(StringArg0 id)

Returns mix amount of a Mix node given its name.

mixNodeSetAmount
void mixNodeSetAmount(StringArg0 id, double ratio)

Sets mix amount of a Mix node given its name and value. A Mix node adds input b to input a by a the amount given by ratio.

nodeExists
bool nodeExists(StringArg0 node)

Check if a node exists (by name).

nodeGetInputCount
long nodeGetInputCount(StringArg0 id)

Return the input count for a given node. Different types of nodes have different amount of inputs.

nodeGetInputSource
String nodeGetInputSource(StringArg0 id, long idx)

Return the input source for a given node input.

nodeGetPosition
Vector2 nodeGetPosition(StringArg0 id)

Returns position of a node in the graph given its name.

nodeGetType
AnimationTreePlayer.NodeType nodeGetType(StringArg0 id)

Get the node type, will return from NODE_* enum.

nodeRename
GodotError nodeRename(StringArg0 node, StringArg1 new_name)

Rename a node in the graph.

nodeSetPosition
void nodeSetPosition(StringArg0 id, Vector2 screen_position)

Sets position of a node in the graph given its name and position.

oneshotNodeGetAutorestartDelay
double oneshotNodeGetAutorestartDelay(StringArg0 id)

Returns autostart delay of a OneShot node given its name.

oneshotNodeGetAutorestartRandomDelay
double oneshotNodeGetAutorestartRandomDelay(StringArg0 id)

Returns autostart random delay of a OneShot node given its name.

oneshotNodeGetFadeinTime
double oneshotNodeGetFadeinTime(StringArg0 id)

Returns fade in time of a OneShot node given its name.

oneshotNodeGetFadeoutTime
double oneshotNodeGetFadeoutTime(StringArg0 id)

Returns fade out time of a OneShot node given its name.

oneshotNodeHasAutorestart
bool oneshotNodeHasAutorestart(StringArg0 id)

Returns whether a OneShot node will auto restart given its name.

oneshotNodeIsActive
bool oneshotNodeIsActive(StringArg0 id)

Returns whether a OneShot node is active given its name.

oneshotNodeSetAutorestart
void oneshotNodeSetAutorestart(StringArg0 id, bool enable)

Sets autorestart property of a OneShot node given its name and value.

oneshotNodeSetAutorestartDelay
void oneshotNodeSetAutorestartDelay(StringArg0 id, double delay_sec)

Sets autorestart delay of a OneShot node given its name and value in seconds.

oneshotNodeSetAutorestartRandomDelay
void oneshotNodeSetAutorestartRandomDelay(StringArg0 id, double rand_sec)

Sets autorestart random delay of a OneShot node given its name and value in seconds.

oneshotNodeSetFadeinTime
void oneshotNodeSetFadeinTime(StringArg0 id, double time_sec)

Sets fade in time of a OneShot node given its name and value in seconds.

oneshotNodeSetFadeoutTime
void oneshotNodeSetFadeoutTime(StringArg0 id, double time_sec)

Sets fade out time of a OneShot node given its name and value in seconds.

oneshotNodeSetFilterPath
void oneshotNodeSetFilterPath(StringArg0 id, NodePathArg1 path, bool enable)

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
void oneshotNodeStart(StringArg0 id)

Starts a OneShot node given its name.

oneshotNodeStop
void oneshotNodeStop(StringArg0 id)

Stops the OneShot node with name id.

opAssign
AnimationTreePlayer opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(AnimationTreePlayer other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
recomputeCaches
void recomputeCaches()

Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.

removeNode
void removeNode(StringArg0 id)

Removes the animation node with name id.

reset
void reset()

Resets this AnimationTreePlayer.

setActive
void setActive(bool enabled)
setAnimationProcessMode
void setAnimationProcessMode(long mode)
setBasePath
void setBasePath(NodePathArg0 path)
setMasterPlayer
void setMasterPlayer(NodePathArg0 nodepath)
timescaleNodeGetScale
double timescaleNodeGetScale(StringArg0 id)

Returns time scale value of the TimeScale node with name id.

timescaleNodeSetScale
void timescaleNodeSetScale(StringArg0 id, double scale)

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
void timeseekNodeSeek(StringArg0 id, double seconds)

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
void transitionNodeDeleteInput(StringArg0 id, long input_idx)

Deletes the input at input_idx for the transition node with name id.

transitionNodeGetCurrent
long transitionNodeGetCurrent(StringArg0 id)

Returns the index of the currently evaluated input for the transition node with name id.

transitionNodeGetInputCount
long transitionNodeGetInputCount(StringArg0 id)

Returns the number of inputs for the transition node with name id. You can add inputs by rightclicking on the transition node.

transitionNodeGetXfadeTime
double transitionNodeGetXfadeTime(StringArg0 id)

Returns the cross fade time for the transition node with name id.

transitionNodeHasInputAutoAdvance
bool transitionNodeHasInputAutoAdvance(StringArg0 id, long input_idx)

Returns true if the input at input_idx on transition node with name id is set to automatically advance to the next input upon completion.

transitionNodeSetCurrent
void transitionNodeSetCurrent(StringArg0 id, long input_idx)

The transition node with name id sets its current input at input_idx.

transitionNodeSetInputAutoAdvance
void transitionNodeSetInputAutoAdvance(StringArg0 id, long input_idx, bool enable)

The transition node with name id advances to its next input automatically when the input at input_idx completes.

transitionNodeSetInputCount
void transitionNodeSetInputCount(StringArg0 id, long count)

Resizes the number of inputs available for the transition node with name id.

transitionNodeSetXfadeTime
void transitionNodeSetXfadeTime(StringArg0 id, double time_sec)

The transition node with name id sets its cross fade time to time_sec.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

active
bool active [@property getter]
bool active [@property setter]

If true the AnimationTreePlayer is able to play animations. Default value: false.

basePath
NodePath basePath [@property getter]
NodePath basePath [@property setter]

The node from which to relatively access other nodes. Default value: "..". It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at.

masterPlayer
NodePath masterPlayer [@property getter]
NodePath masterPlayer [@property setter]

The path to the AnimationPlayer from which this AnimationTreePlayer binds animations to animation nodes. Once set, Animation nodes can be added to the AnimationTreePlayer.

playbackProcessMode
AnimationTreePlayer.AnimationProcessMode playbackProcessMode [@property getter]
long playbackProcessMode [@property setter]

The thread in which to update animations. Default value: ANIMATION_PROCESS_IDLE.

Static functions

_new
AnimationTreePlayer _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta