2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "Animation" inherits= "Resource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 22:42:36 +02:00
<brief_description >
2023-04-28 17:16:44 +02:00
Holds data that can be used to animate anything in the engine.
2017-09-12 22:42:36 +02:00
</brief_description>
<description >
2023-04-28 17:16:44 +02:00
This resource holds data that can be used to animate anything 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.
2020-07-31 16:07:26 +02:00
[codeblocks]
[gdscript]
2018-10-03 04:35:59 +02:00
# This creates an animation that makes the node "Enemy" move to the right by
2024-01-14 19:29:02 +01:00
# 100 pixels in 2.0 seconds.
2018-10-03 04:35:59 +02:00
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
2020-07-29 10:13:44 +02:00
animation.track_set_path(track_index, "Enemy:position:x")
2018-10-03 04:35:59 +02:00
animation.track_insert_key(track_index, 0.0, 0)
2024-01-14 19:29:02 +01:00
animation.track_insert_key(track_index, 2.0, 100)
animation.length = 2.0
2020-07-31 16:07:26 +02:00
[/gdscript]
[csharp]
// This creates an animation that makes the node "Enemy" move to the right by
2024-01-14 19:29:02 +01:00
// 100 pixels in 2.0 seconds.
2020-07-31 16:07:26 +02:00
var animation = new Animation();
int trackIndex = animation.AddTrack(Animation.TrackType.Value);
animation.TrackSetPath(trackIndex, "Enemy:position:x");
animation.TrackInsertKey(trackIndex, 0.0f, 0);
2024-01-14 19:29:02 +01:00
animation.TrackInsertKey(trackIndex, 2.0f, 100);
animation.Length = 2.0f;
2020-07-31 16:07:26 +02:00
[/csharp]
[/codeblocks]
2020-03-03 19:21:21 +01:00
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
2022-10-24 16:33:11 +02:00
[b]Note:[/b] For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons.
2017-09-12 22:42:36 +02:00
</description>
<tutorials >
2021-11-15 10:43:07 +01:00
<link title= "Animation documentation index" > $DOCS_URL/tutorials/animation/index.html</link>
2017-09-12 22:42:36 +02:00
</tutorials>
<methods >
2024-08-31 08:57:34 +02:00
<method name= "add_marker" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "time" type= "float" />
<description >
Adds a marker to this Animation.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "add_track" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "type" type= "int" enum= "Animation.TrackType" />
<param index= "1" name= "at_position" type= "int" default= "-1" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Adds a track to the Animation.
2017-09-12 22:42:36 +02:00
</description>
</method>
2018-06-11 18:41:16 +02:00
<method name= "animation_track_get_key_animation" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "StringName" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "animation_track_insert_key" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "animation" type= "StringName" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Inserts a key with value [param animation] at the given [param time] (in seconds). The [param track_idx] must be the index of an Animation Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "animation_track_set_key_animation" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "animation" type= "StringName" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_get_key_end_offset" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
2020-03-03 19:21:21 +01:00
End offset is the number of seconds cut off at the ending of the audio stream.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_get_key_start_offset" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
2020-03-03 19:21:21 +01:00
Start offset is the number of seconds cut off at the beginning of the audio stream.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_get_key_stream" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Resource" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_insert_key" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "stream" type= "Resource" />
<param index= "3" name= "start_offset" type= "float" default= "0" />
<param index= "4" name= "end_offset" type= "float" default= "0" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track.
[param stream] is the [AudioStream] resource to play. [param start_offset] is the number of seconds cut off at the beginning of the audio stream, while [param end_offset] is at the ending.
2018-06-11 18:41:16 +02:00
</description>
</method>
2023-01-27 19:25:49 +01:00
<method name= "audio_track_is_use_blend" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "track_idx" type= "int" />
<description >
2023-02-17 17:30:22 +01:00
Returns [code]true[/code] if the track at [param track_idx] will be blended with other animations.
2023-01-27 19:25:49 +01:00
</description>
</method>
2018-06-11 18:41:16 +02:00
<method name= "audio_track_set_key_end_offset" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "offset" type= "float" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the end offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_set_key_start_offset" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "offset" type= "float" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the start offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "audio_track_set_key_stream" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "stream" type= "Resource" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the stream of the key identified by [param key_idx] to value [param stream]. The [param track_idx] must be the index of an Audio Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
2023-01-27 19:25:49 +01:00
<method name= "audio_track_set_use_blend" >
<return type= "void" />
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "enable" type= "bool" />
<description >
Sets whether the track will be blended with other animations. If [code]true[/code], the audio playback volume changes depending on the blend value.
</description>
</method>
2018-06-11 18:41:16 +02:00
<method name= "bezier_track_get_key_in_handle" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_get_key_out_handle" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_get_key_value" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_insert_key" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "value" type= "float" />
<param index= "3" name= "in_handle" type= "Vector2" default= "Vector2(0, 0)" />
<param index= "4" name= "out_handle" type= "Vector2" default= "Vector2(0, 0)" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track.
[param in_handle] is the left-side weight of the added Bezier curve point, [param out_handle] is the right-side one, while [param value] is the actual value at this point.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_interpolate" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_set_key_in_handle" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "in_handle" type= "Vector2" />
<param index= "3" name= "balanced_value_time_ratio" type= "float" default= "1.0" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the in handle of the key identified by [param key_idx] to value [param in_handle]. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_set_key_out_handle" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "out_handle" type= "Vector2" />
<param index= "3" name= "balanced_value_time_ratio" type= "float" default= "1.0" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the out handle of the key identified by [param key_idx] to value [param out_handle]. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
<method name= "bezier_track_set_key_value" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "value" type= "float" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Sets the value of the key identified by [param key_idx] to the given value. The [param track_idx] must be the index of a Bezier Track.
2018-06-11 18:41:16 +02:00
</description>
</method>
2021-10-16 00:04:35 +02:00
<method name= "blend_shape_track_insert_key" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "amount" type= "float" />
2021-10-16 00:04:35 +02:00
<description >
2022-10-24 16:33:11 +02:00
Inserts a key in a given blend shape track. Returns the key index.
2021-10-16 00:04:35 +02:00
</description>
</method>
2023-02-21 03:26:23 +01:00
<method name= "blend_shape_track_interpolate" qualifiers= "const" >
<return type= "float" />
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time_sec" type= "float" />
2023-12-30 07:26:17 +01:00
<param index= "2" name= "backward" type= "bool" default= "false" />
2023-02-21 03:26:23 +01:00
<description >
Returns the interpolated blend shape value at the given time (in seconds). The [param track_idx] must be the index of a blend shape track.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "clear" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2017-09-12 22:42:36 +02:00
<description >
Clear the animation (clear all tracks and reset all).
</description>
</method>
2021-10-21 01:42:22 +02:00
<method name= "compress" >
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "page_size" type= "int" default= "8192" />
<param index= "1" name= "fps" type= "int" default= "120" />
<param index= "2" name= "split_tolerance" type= "float" default= "4.0" />
2021-10-21 01:42:22 +02:00
<description >
2022-10-24 16:33:11 +02:00
Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return [code]true[/code] once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions.
[b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.
2021-10-21 01:42:22 +02:00
</description>
</method>
2017-12-10 00:43:30 +01:00
<method name= "copy_track" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "to_animation" type= "Animation" />
2017-12-10 00:43:30 +01:00
<description >
2023-10-16 14:37:19 +02:00
Adds a new track to [param to_animation] that is a copy of the given track from this animation.
2017-12-10 00:43:30 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "find_track" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "path" type= "NodePath" />
<param index= "1" name= "type" type= "int" enum= "Animation.TrackType" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the index of the specified track. If the track is not found, return -1.
2017-09-12 22:42:36 +02:00
</description>
</method>
2024-08-31 08:57:34 +02:00
<method name= "get_marker_at_time" qualifiers= "const" >
<return type= "StringName" />
<param index= "0" name= "time" type= "float" />
<description >
Returns the name of the marker located at the given time.
</description>
</method>
<method name= "get_marker_color" qualifiers= "const" >
<return type= "Color" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns the given marker's color.
</description>
</method>
<method name= "get_marker_names" qualifiers= "const" >
<return type= "PackedStringArray" />
<description >
Returns every marker in this Animation, sorted ascending by time.
</description>
</method>
<method name= "get_marker_time" qualifiers= "const" >
<return type= "float" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns the given marker's time.
</description>
</method>
<method name= "get_next_marker" qualifiers= "const" >
<return type= "StringName" />
<param index= "0" name= "time" type= "float" />
<description >
Returns the closest marker that comes after the given time. If no such marker exists, an empty string is returned.
</description>
</method>
<method name= "get_prev_marker" qualifiers= "const" >
<return type= "StringName" />
<param index= "0" name= "time" type= "float" />
<description >
Returns the closest marker that comes before the given time. If no such marker exists, an empty string is returned.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_track_count" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the amount of tracks in the animation.
2017-09-12 22:42:36 +02:00
</description>
</method>
2024-08-31 08:57:34 +02:00
<method name= "has_marker" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "name" type= "StringName" />
<description >
Returns [code]true[/code] if this Animation contains a marker with the given name.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "method_track_get_name" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "StringName" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the method name of a method track.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "method_track_get_params" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Array" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the arguments values to be called on a method track for a given key in a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
2024-09-11 05:50:39 +02:00
<method name= "optimize" >
<return type= "void" />
<param index= "0" name= "allowed_velocity_err" type= "float" default= "0.01" />
<param index= "1" name= "allowed_angular_err" type= "float" default= "0.01" />
<param index= "2" name= "precision" type= "int" default= "3" />
<description >
Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds.
</description>
</method>
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<method name= "position_track_insert_key" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "position" type= "Vector3" />
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<description >
2022-10-24 16:33:11 +02:00
Inserts a key in a given 3D position track. Returns the key index.
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
</description>
</method>
2023-02-21 03:26:23 +01:00
<method name= "position_track_interpolate" qualifiers= "const" >
<return type= "Vector3" />
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time_sec" type= "float" />
2023-12-30 07:26:17 +01:00
<param index= "2" name= "backward" type= "bool" default= "false" />
2023-02-21 03:26:23 +01:00
<description >
Returns the interpolated position value at the given time (in seconds). The [param track_idx] must be the index of a 3D position track.
</description>
</method>
2024-08-31 08:57:34 +02:00
<method name= "remove_marker" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<description >
Removes the marker with the given name from this Animation.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "remove_track" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Removes a track by specifying the track index.
2017-09-12 22:42:36 +02:00
</description>
</method>
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<method name= "rotation_track_insert_key" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "rotation" type= "Quaternion" />
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<description >
2022-10-24 16:33:11 +02:00
Inserts a key in a given 3D rotation track. Returns the key index.
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
</description>
</method>
2023-02-21 03:26:23 +01:00
<method name= "rotation_track_interpolate" qualifiers= "const" >
<return type= "Quaternion" />
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time_sec" type= "float" />
2023-12-30 07:26:17 +01:00
<param index= "2" name= "backward" type= "bool" default= "false" />
2023-02-21 03:26:23 +01:00
<description >
Returns the interpolated rotation value at the given time (in seconds). The [param track_idx] must be the index of a 3D rotation track.
</description>
</method>
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<method name= "scale_track_insert_key" >
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "scale" type= "Vector3" />
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<description >
2022-10-24 16:33:11 +02:00
Inserts a key in a given 3D scale track. Returns the key index.
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
</description>
</method>
2023-02-21 03:26:23 +01:00
<method name= "scale_track_interpolate" qualifiers= "const" >
<return type= "Vector3" />
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time_sec" type= "float" />
2023-12-30 07:26:17 +01:00
<param index= "2" name= "backward" type= "bool" default= "false" />
2023-02-21 03:26:23 +01:00
<description >
Returns the interpolated scale value at the given time (in seconds). The [param track_idx] must be the index of a 3D scale track.
</description>
</method>
2024-08-31 08:57:34 +02:00
<method name= "set_marker_color" >
<return type= "void" />
<param index= "0" name= "name" type= "StringName" />
<param index= "1" name= "color" type= "Color" />
<description >
Sets the given marker's color.
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "track_find_key" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
2022-12-08 13:38:01 +01:00
<param index= "2" name= "find_mode" type= "int" enum= "Animation.FindMode" default= "0" />
2023-12-31 08:05:34 +01:00
<param index= "3" name= "limit" type= "bool" default= "false" />
2024-06-07 10:51:19 +02:00
<param index= "4" name= "backward" type= "bool" default= "false" />
2017-09-12 22:42:36 +02:00
<description >
2022-12-08 13:38:01 +01:00
Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given.
2023-12-31 08:05:34 +01:00
If [param limit] is [code]true[/code], it does not return keys outside the animation range.
2024-06-07 10:51:19 +02:00
If [param backward] is [code]true[/code], the direction is reversed in methods that rely on one directional processing.
For example, in case [param find_mode] is [constant FIND_MODE_NEAREST], if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if [param backward] is [code]true[/code], the first key found is retrieved after the position.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_interpolation_loop_wrap" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns [code]true[/code] if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_interpolation_type" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "Animation.InterpolationType" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Returns the interpolation type of a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_key_count" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2022-08-18 00:08:09 +02:00
Returns the number of keys in a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_key_time" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the time at which the key is located.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_key_transition" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "float" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2021-01-04 14:33:44 +01:00
Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_key_value" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Variant" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the value of a given key in a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_path" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "NodePath" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Gets the path of a track. For more information on the path format, see [method track_set_path].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_get_type" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "Animation.TrackType" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Gets the type of a track.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_insert_key" >
2021-12-20 10:15:21 +01:00
<return type= "int" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
<param index= "2" name= "key" type= "Variant" />
<param index= "3" name= "transition" type= "float" default= "1" />
2017-09-12 22:42:36 +02:00
<description >
2021-12-20 10:15:21 +01:00
Inserts a generic key in a given track. Returns the key index.
2017-09-12 22:42:36 +02:00
</description>
</method>
2021-10-21 01:42:22 +02:00
<method name= "track_is_compressed" qualifiers= "const" >
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2021-10-21 01:42:22 +02:00
<description >
2022-10-24 16:33:11 +02:00
Returns [code]true[/code] if the track is compressed, [code]false[/code] otherwise. See also [method compress].
2021-10-21 01:42:22 +02:00
</description>
</method>
2017-12-10 00:43:30 +01:00
<method name= "track_is_enabled" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-12-10 00:43:30 +01:00
<description >
2022-08-12 19:51:01 +02:00
Returns [code]true[/code] if the track at index [param track_idx] is enabled.
2017-12-10 00:43:30 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "track_is_imported" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_move_down" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Moves a track down.
2017-09-12 22:42:36 +02:00
</description>
</method>
2019-05-25 18:01:44 +02:00
<method name= "track_move_to" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "to_idx" type= "int" />
2019-05-25 18:01:44 +02:00
<description >
2022-08-12 19:51:01 +02:00
Changes the index position of track [param track_idx] to the one defined in [param to_idx].
2019-05-25 18:01:44 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "track_move_up" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Moves a track up.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_remove_key" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Removes a key by index in a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-12-14 17:54:43 +01:00
<method name= "track_remove_key_at_time" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
2022-08-12 19:51:01 +02:00
Removes a key at [param time] in a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
2017-12-10 00:43:30 +01:00
<method name= "track_set_enabled" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "enabled" type= "bool" />
2017-12-10 00:43:30 +01:00
<description >
2017-12-16 20:34:16 +01:00
Enables/disables the given track. Tracks are enabled by default.
2017-12-10 00:43:30 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "track_set_imported" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "imported" type= "bool" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Sets the given track as imported or not.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_set_interpolation_loop_wrap" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "interpolation" type= "bool" />
2017-09-12 22:42:36 +02:00
<description >
2022-08-12 19:51:01 +02:00
If [code]true[/code], the track at [param track_idx] wraps the interpolation loop.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "track_set_interpolation_type" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "interpolation" type= "int" enum= "Animation.InterpolationType" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Sets the interpolation type of a given track.
2017-09-12 22:42:36 +02:00
</description>
</method>
2019-06-01 12:34:29 +02:00
<method name= "track_set_key_time" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "time" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
2019-06-22 01:04:47 +02:00
Sets the time of an existing key.
2017-09-12 22:42:36 +02:00
</description>
</method>
2019-06-01 12:34:29 +02:00
<method name= "track_set_key_transition" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key_idx" type= "int" />
<param index= "2" name= "transition" type= "float" />
2017-09-12 22:42:36 +02:00
<description >
2021-01-04 14:33:44 +01:00
Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
2017-09-12 22:42:36 +02:00
</description>
</method>
2019-06-01 12:34:29 +02:00
<method name= "track_set_key_value" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "key" type= "int" />
<param index= "2" name= "value" type= "Variant" />
2019-05-31 00:39:00 +02:00
<description >
2019-06-22 01:04:47 +02:00
Sets the value of an existing key.
2019-05-31 00:39:00 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "track_set_path" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "path" type= "NodePath" />
2017-09-12 22:42:36 +02:00
<description >
2024-07-07 16:07:09 +02:00
Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the [member AnimationMixer.root_node] that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
2019-06-22 01:04:47 +02:00
For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
2018-06-11 18:41:16 +02:00
<method name= "track_swap" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "with_idx" type= "int" />
2018-06-11 18:41:16 +02:00
<description >
2022-08-12 19:51:01 +02:00
Swaps the track [param track_idx]'s index position with the track [param with_idx].
2018-06-11 18:41:16 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "value_track_get_update_mode" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "int" enum= "Animation.UpdateMode" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
2017-09-12 22:42:36 +02:00
<description >
2019-05-24 04:15:43 +02:00
Returns the update mode of a value track.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-10-09 15:04:15 +02:00
<method name= "value_track_interpolate" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Variant" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "time_sec" type= "float" />
2023-12-30 07:26:17 +01:00
<param index= "2" name= "backward" type= "bool" default= "false" />
2017-09-12 22:42:36 +02:00
<description >
2022-08-12 19:51:01 +02:00
Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track.
2024-06-07 10:51:19 +02:00
A [param backward] mainly affects the direction of key retrieval of the track with [constant UPDATE_DISCRETE] converted by [constant AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to match the result with [method track_find_key].
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-10-09 15:04:15 +02:00
<method name= "value_track_set_update_mode" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "track_idx" type= "int" />
<param index= "1" name= "mode" type= "int" enum= "Animation.UpdateMode" />
2020-03-19 21:08:24 +01:00
<description >
2020-10-09 15:04:15 +02:00
Sets the update mode (see [enum UpdateMode]) of a value track.
2020-03-19 21:08:24 +01:00
</description>
</method>
2017-09-12 22:42:36 +02:00
</methods>
2018-01-11 23:38:35 +01:00
<members >
2024-08-10 18:53:45 +02:00
<member name= "capture_included" type= "bool" setter= "" getter= "is_capture_included" default= "false" >
2024-05-02 04:23:11 +02:00
Returns [code]true[/code] if the capture track is included. This is a cached readonly value for performance.
</member>
2019-06-29 12:38:01 +02:00
<member name= "length" type= "float" setter= "set_length" getter= "get_length" default= "1.0" >
2019-06-22 01:04:47 +02:00
The total length of the animation (in seconds).
[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
2018-01-11 23:38:35 +01:00
</member>
2021-10-15 15:25:00 +02:00
<member name= "loop_mode" type= "int" setter= "set_loop_mode" getter= "get_loop_mode" enum= "Animation.LoopMode" default= "0" >
Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
2018-01-11 23:38:35 +01:00
</member>
2024-04-19 11:05:46 +02:00
<member name= "step" type= "float" setter= "set_step" getter= "get_step" default= "0.0333333" >
2018-01-11 23:38:35 +01:00
The animation step value.
</member>
</members>
2017-09-12 22:42:36 +02:00
<constants >
2017-11-24 23:16:30 +01:00
<constant name= "TYPE_VALUE" value= "0" enum= "TrackType" >
2022-10-24 16:33:11 +02:00
Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons.
2017-09-12 22:42:36 +02:00
</constant>
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
<constant name= "TYPE_POSITION_3D" value= "1" enum= "TrackType" >
2022-10-24 16:33:11 +02:00
3D position track (values are stored in [Vector3]s).
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
</constant>
<constant name= "TYPE_ROTATION_3D" value= "2" enum= "TrackType" >
2022-10-24 16:33:11 +02:00
3D rotation track (values are stored in [Quaternion]s).
Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.
This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:
* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.
*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 00:20:58 +02:00
</constant>
<constant name= "TYPE_SCALE_3D" value= "3" enum= "TrackType" >
2022-10-24 16:33:11 +02:00
3D scale track (values are stored in [Vector3]s).
2017-09-12 22:42:36 +02:00
</constant>
2021-10-16 00:04:35 +02:00
<constant name= "TYPE_BLEND_SHAPE" value= "4" enum= "TrackType" >
2022-10-24 16:33:11 +02:00
Blend shape track.
2021-10-16 00:04:35 +02:00
</constant>
<constant name= "TYPE_METHOD" value= "5" enum= "TrackType" >
2017-09-12 22:42:36 +02:00
Method tracks call functions with given arguments per key.
</constant>
2021-10-16 00:04:35 +02:00
<constant name= "TYPE_BEZIER" value= "6" enum= "TrackType" >
2020-03-03 19:21:21 +01:00
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
2018-06-11 18:41:16 +02:00
</constant>
2021-10-16 00:04:35 +02:00
<constant name= "TYPE_AUDIO" value= "7" enum= "TrackType" >
2020-03-03 19:21:21 +01:00
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
2018-06-11 18:41:16 +02:00
</constant>
2021-10-16 00:04:35 +02:00
<constant name= "TYPE_ANIMATION" value= "8" enum= "TrackType" >
2020-03-03 19:21:21 +01:00
Animation tracks play animations in other [AnimationPlayer] nodes.
2018-06-11 18:41:16 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "INTERPOLATION_NEAREST" value= "0" enum= "InterpolationType" >
2017-09-12 22:42:36 +02:00
No interpolation (nearest value).
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "INTERPOLATION_LINEAR" value= "1" enum= "InterpolationType" >
2017-09-12 22:42:36 +02:00
Linear interpolation.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "INTERPOLATION_CUBIC" value= "2" enum= "InterpolationType" >
2022-10-24 16:33:11 +02:00
Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
2017-09-12 22:42:36 +02:00
</constant>
2022-08-26 04:42:00 +02:00
<constant name= "INTERPOLATION_LINEAR_ANGLE" value= "3" enum= "InterpolationType" >
Linear interpolation with shortest path rotation.
[b]Note:[/b] The result value is always normalized and may not match the key value.
</constant>
<constant name= "INTERPOLATION_CUBIC_ANGLE" value= "4" enum= "InterpolationType" >
Cubic interpolation with shortest path rotation.
[b]Note:[/b] The result value is always normalized and may not match the key value.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "UPDATE_CONTINUOUS" value= "0" enum= "UpdateMode" >
2022-11-29 10:51:45 +01:00
Update between keyframes and hold the value.
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "UPDATE_DISCRETE" value= "1" enum= "UpdateMode" >
2017-09-12 22:42:36 +02:00
Update at the keyframes.
</constant>
2022-11-29 10:51:45 +01:00
<constant name= "UPDATE_CAPTURE" value= "2" enum= "UpdateMode" >
2024-05-02 04:23:11 +02:00
Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture], [member AnimationPlayer.playback_auto_capture], and [method AnimationPlayer.play_with_capture].
2018-06-11 18:41:16 +02:00
</constant>
2021-10-15 15:25:00 +02:00
<constant name= "LOOP_NONE" value= "0" enum= "LoopMode" >
At both ends of the animation, the animation will stop playing.
</constant>
<constant name= "LOOP_LINEAR" value= "1" enum= "LoopMode" >
At both ends of the animation, the animation will be repeated without changing the playback direction.
</constant>
<constant name= "LOOP_PINGPONG" value= "2" enum= "LoopMode" >
Repeats playback and reverse playback at both ends of the animation.
</constant>
2022-11-29 10:51:45 +01:00
<constant name= "LOOPED_FLAG_NONE" value= "0" enum= "LoopedFlag" >
This flag indicates that the animation proceeds without any looping.
</constant>
<constant name= "LOOPED_FLAG_END" value= "1" enum= "LoopedFlag" >
This flag indicates that the animation has reached the end of the animation and just after loop processed.
</constant>
<constant name= "LOOPED_FLAG_START" value= "2" enum= "LoopedFlag" >
This flag indicates that the animation has reached the start of the animation and just after loop processed.
</constant>
2022-12-08 13:38:01 +01:00
<constant name= "FIND_MODE_NEAREST" value= "0" enum= "FindMode" >
Finds the nearest time key.
</constant>
<constant name= "FIND_MODE_APPROX" value= "1" enum= "FindMode" >
Finds only the key with approximating the time.
</constant>
<constant name= "FIND_MODE_EXACT" value= "2" enum= "FindMode" >
Finds only the key with matching the time.
</constant>
2017-09-12 22:42:36 +02:00
</constants>
</class>