- addTrack
long addTrack(long type, long at_position)
Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
- animationTrackGetKeyAnimation
String animationTrackGetKeyAnimation(long idx, long key_idx)
- animationTrackInsertKey
long animationTrackInsertKey(long track, double time, StringArg2 animation)
- animationTrackSetKeyAnimation
void animationTrackSetKeyAnimation(long idx, long key_idx, StringArg2 animation)
- audioTrackGetKeyEndOffset
double audioTrackGetKeyEndOffset(long idx, long key_idx)
- audioTrackGetKeyStartOffset
double audioTrackGetKeyStartOffset(long idx, long key_idx)
- audioTrackGetKeyStream
Ref!Resource audioTrackGetKeyStream(long idx, long key_idx)
- audioTrackInsertKey
long audioTrackInsertKey(long track, double time, Resource stream, double start_offset, double end_offset)
- audioTrackSetKeyEndOffset
void audioTrackSetKeyEndOffset(long idx, long key_idx, double offset)
- audioTrackSetKeyStartOffset
void audioTrackSetKeyStartOffset(long idx, long key_idx, double offset)
- audioTrackSetKeyStream
void audioTrackSetKeyStream(long idx, long key_idx, Resource stream)
- bezierTrackGetKeyInHandle
Vector2 bezierTrackGetKeyInHandle(long idx, long key_idx)
- bezierTrackGetKeyOutHandle
Vector2 bezierTrackGetKeyOutHandle(long idx, long key_idx)
- bezierTrackGetKeyValue
double bezierTrackGetKeyValue(long idx, long key_idx)
- bezierTrackInsertKey
long bezierTrackInsertKey(long track, double time, double value, Vector2 in_handle, Vector2 out_handle)
- bezierTrackInterpolate
double bezierTrackInterpolate(long track, double time)
- bezierTrackSetKeyInHandle
void bezierTrackSetKeyInHandle(long idx, long key_idx, Vector2 in_handle)
- bezierTrackSetKeyOutHandle
void bezierTrackSetKeyOutHandle(long idx, long key_idx, Vector2 out_handle)
- bezierTrackSetKeyValue
void bezierTrackSetKeyValue(long idx, long key_idx, double value)
- clear
void clear()
Clear the animation (clear all tracks and reset all).
- copyTrack
void copyTrack(long track, Animation to_animation)
Adds a new track that is a copy of the given track from to_animation.
- findTrack
long findTrack(NodePathArg0 path)
Return the index of the specified track. If the track is not found, return -1.
- getLength
double getLength()
- getStep
double getStep()
- getTrackCount
long getTrackCount()
Return the amount of tracks in the animation.
- hasLoop
bool hasLoop()
- methodTrackGetKeyIndices
PoolIntArray methodTrackGetKeyIndices(long idx, double time_sec, double delta)
Return all the key indices of a method track, given a position and delta time.
- methodTrackGetName
String methodTrackGetName(long idx, long key_idx)
Return the method name of a method track.
- methodTrackGetParams
Array methodTrackGetParams(long idx, long key_idx)
Return the arguments values to be called on a method track for a given key in a given track.
- opAssign
Animation opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(Animation 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.
- removeTrack
void removeTrack(long idx)
Remove a track by specifying the track index.
- setLength
void setLength(double time_sec)
- setLoop
void setLoop(bool enabled)
- setStep
void setStep(double size_sec)
- trackFindKey
long trackFindKey(long idx, double time, bool exact)
Find the key index by time in a given track. Optionally, only find it if the exact time is given.
- trackGetInterpolationLoopWrap
bool trackGetInterpolationLoopWrap(long idx)
Returns true if the track at idx wraps the interpolation loop. Default value: true.
- trackGetInterpolationType
Animation.InterpolationType trackGetInterpolationType(long idx)
Return the interpolation type of a given track, from the INTERPOLATION_* enum.
- trackGetKeyCount
long trackGetKeyCount(long idx)
Return the amount of keys in a given track.
- trackGetKeyTime
double trackGetKeyTime(long idx, long key_idx)
Return the time at which the key is located.
- trackGetKeyTransition
double trackGetKeyTransition(long idx, long key_idx)
Return the transition curve (easing) for a specific key (see built-in math function "ease").
- trackGetKeyValue
Variant trackGetKeyValue(long idx, long key_idx)
Return the value of a given key in a given track.
- trackGetPath
NodePath trackGetPath(long idx)
Get the path of a track. for more information on the path format, see trackSetPath
- trackGetType
Animation.TrackType trackGetType(long idx)
- trackInsertKey
void trackInsertKey(long idx, double time, VariantArg2 key, double transition)
Insert a generic key in a given track.
- trackIsEnabled
bool trackIsEnabled(long idx)
Returns true if the track at index idx is enabled.
- trackIsImported
bool trackIsImported(long idx)
Return true if the given track is imported. Else, return false.
- trackMoveDown
void trackMoveDown(long idx)
- trackMoveUp
void trackMoveUp(long idx)
- trackRemoveKey
void trackRemoveKey(long idx, long key_idx)
Remove a key by index in a given track.
- trackRemoveKeyAtPosition
void trackRemoveKeyAtPosition(long idx, double position)
Remove a key by position (seconds) in a given track.
- trackSetEnabled
void trackSetEnabled(long idx, bool enabled)
Enables/disables the given track. Tracks are enabled by default.
- trackSetImported
void trackSetImported(long idx, bool imported)
Set the given track as imported or not.
- trackSetInterpolationLoopWrap
void trackSetInterpolationLoopWrap(long idx, bool interpolation)
If true the track at idx wraps the interpolation loop.
- trackSetInterpolationType
void trackSetInterpolationType(long idx, long interpolation)
Set the interpolation type of a given track, from the INTERPOLATION_* enum.
- trackSetKeyTransition
void trackSetKeyTransition(long idx, long key_idx, double transition)
Set the transition curve (easing) for a specific key (see built-in math function "ease").
- trackSetKeyValue
void trackSetKeyValue(long idx, long key, VariantArg2 value)
Set the value of an existing key.
- trackSetPath
void trackSetPath(long idx, NodePathArg1 path)
Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":".
Example: "character/skeleton:ankle" or "character/mesh:transform/local".
- trackSwap
void trackSwap(long idx, long with_idx)
- transformTrackInsertKey
long transformTrackInsertKey(long idx, double time, Vector3 location, Quat rotation, Vector3 scale)
Insert a transform key for a transform track.
- transformTrackInterpolate
Array transformTrackInterpolate(long idx, double time_sec)
Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (Vector3), rotation (Quat) and scale (Vector3).
- valueTrackGetKeyIndices
PoolIntArray valueTrackGetKeyIndices(long idx, double time_sec, double delta)
Return all the key indices of a value track, given a position and delta time.
- valueTrackGetUpdateMode
Animation.UpdateMode valueTrackGetUpdateMode(long idx)
Return the update mode of a value track.
- valueTrackSetUpdateMode
void valueTrackSetUpdateMode(long idx, long mode)
Set the update mode (UPDATE_*) of a value track.
Contains data used to animate everything in the engine.
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.