AnimationTreePlayer

Deprecated. Animation player that uses a node graph for blending animations. Superseded by AnimationTree.

Deprecated. 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. See AnimationTree for a more full-featured replacement of this node.

@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, String 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. Events between the current frame and delta are handled.

animationNodeGetAnimation
Ref!Animation animationNodeGetAnimation(String id)

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

animationNodeGetMasterAnimation
String animationNodeGetMasterAnimation(String id)

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

animationNodeGetPosition
double animationNodeGetPosition(String id)

Returns the absolute playback timestamp of the animation node with name id.

animationNodeSetAnimation
void animationNodeSetAnimation(String id, Animation animation)

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

animationNodeSetFilterPath
void animationNodeSetFilterPath(String 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(String id, String source)

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

areNodesConnected
bool areNodesConnected(String id, String dst_id, long dst_input_idx)

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

blend2NodeGetAmount
double blend2NodeGetAmount(String id)

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

blend2NodeSetAmount
void blend2NodeSetAmount(String id, double blend)

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
void blend2NodeSetFilterPath(String id, NodePathArg1 path, bool enable)

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
double blend3NodeGetAmount(String id)

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

blend3NodeSetAmount
void blend3NodeSetAmount(String id, double blend)

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
Vector2 blend4NodeGetAmount(String id)

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

blend4NodeSetAmount
void blend4NodeSetAmount(String 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(String id, String dst_id, long dst_input_idx)

Connects node id to dst_id at the specified input slot.

disconnectNodes
void disconnectNodes(String 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(String id)

Returns the mix amount of a Mix node given its name.

mixNodeSetAmount
void mixNodeSetAmount(String id, double ratio)

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
bool nodeExists(String node)

Check if a node exists (by name).

nodeGetInputCount
long nodeGetInputCount(String id)

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

nodeGetInputSource
String nodeGetInputSource(String id, long idx)

Returns the input source for a given node input.

nodeGetPosition
Vector2 nodeGetPosition(String id)

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

nodeGetType
AnimationTreePlayer.NodeType nodeGetType(String id)

Gets the node type, will return from nodetype enum.

nodeRename
GodotError nodeRename(String node, String new_name)

Renames a node in the graph.

nodeSetPosition
void nodeSetPosition(String id, Vector2 screen_position)

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

oneshotNodeGetAutorestartDelay
double oneshotNodeGetAutorestartDelay(String id)

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

oneshotNodeGetAutorestartRandomDelay
double oneshotNodeGetAutorestartRandomDelay(String id)

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

oneshotNodeGetFadeinTime
double oneshotNodeGetFadeinTime(String id)

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

oneshotNodeGetFadeoutTime
double oneshotNodeGetFadeoutTime(String id)

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

oneshotNodeHasAutorestart
bool oneshotNodeHasAutorestart(String id)

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

oneshotNodeIsActive
bool oneshotNodeIsActive(String id)

Returns whether a OneShot node is active given its name.

oneshotNodeSetAutorestart
void oneshotNodeSetAutorestart(String id, bool enable)

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

oneshotNodeSetAutorestartDelay
void oneshotNodeSetAutorestartDelay(String id, double delay_sec)

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

oneshotNodeSetAutorestartRandomDelay
void oneshotNodeSetAutorestartRandomDelay(String id, double rand_sec)

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

oneshotNodeSetFadeinTime
void oneshotNodeSetFadeinTime(String id, double time_sec)

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

oneshotNodeSetFadeoutTime
void oneshotNodeSetFadeoutTime(String id, double time_sec)

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

oneshotNodeSetFilterPath
void oneshotNodeSetFilterPath(String 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(String id)

Starts a OneShot node given its name.

oneshotNodeStop
void oneshotNodeStop(String id)

Stops the OneShot node with name id.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(AnimationTreePlayer other)
opEquals
bool opEquals(typeof(null) n)
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(String 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(String id)

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

timescaleNodeSetScale
void timescaleNodeSetScale(String 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(String 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.

toHash
size_t toHash()
transitionNodeDeleteInput
void transitionNodeDeleteInput(String id, long input_idx)

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

transitionNodeGetCurrent
long transitionNodeGetCurrent(String id)

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

transitionNodeGetInputCount
long transitionNodeGetInputCount(String id)

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

transitionNodeGetXfadeTime
double transitionNodeGetXfadeTime(String id)

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

transitionNodeHasInputAutoAdvance
bool transitionNodeHasInputAutoAdvance(String id, long input_idx)

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
void transitionNodeSetCurrent(String id, long input_idx)

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

transitionNodeSetInputAutoAdvance
void transitionNodeSetInputAutoAdvance(String 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(String id, long count)

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

transitionNodeSetXfadeTime
void transitionNodeSetXfadeTime(String 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.

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

The 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
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.

Static functions

_new
AnimationTreePlayer _new()

Construct a new instance of AnimationTreePlayer. Note: use memnew!AnimationTreePlayer instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
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
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(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