classref: Sync with latest 4.0-dev

This commit is contained in:
Rémi Verschelde
2021-10-05 16:09:21 +02:00
parent 6952796767
commit f6f6c1bf19
958 changed files with 113054 additions and 52009 deletions

View File

@@ -9,7 +9,7 @@
Animation
=========
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Contains data used to animate everything in the engine.
@@ -18,16 +18,31 @@ Description
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.
::
.. tabs::
.. code-tab:: gdscript
# This creates an animation that makes the node "Enemy" move to the right by
# 100 pixels in 1 second.
# 100 pixels in 0.5 seconds.
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
animation.track_set_path(track_index, "Enemy:position:x")
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
.. code-tab:: csharp
// This creates an animation that makes the node "Enemy" move to the right by
// 100 pixels in 0.5 seconds.
var animation = new Animation();
int trackIndex = animation.AddTrack(Animation.TrackType.Value);
animation.TrackSetPath(trackIndex, "Enemy:position:x");
animation.TrackInsertKey(trackIndex, 0.0f, 0);
animation.TrackInsertKey(trackIndex, 0.5f, 100);
Animations are just data containers, and must be added to nodes such as an :ref:`AnimationPlayer<class_AnimationPlayer>` to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check :ref:`TrackType<enum_Animation_TrackType>` to see available types.
Tutorials
@@ -49,123 +64,125 @@ Properties
Methods
-------
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`add_track<class_Animation_method_add_track>` **(** :ref:`TrackType<enum_Animation_TrackType>` type, :ref:`int<class_int>` at_position=-1 **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`animation_track_get_key_animation<class_Animation_method_animation_track_get_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`animation_track_insert_key<class_Animation_method_animation_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`StringName<class_StringName>` animation **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`animation_track_set_key_animation<class_Animation_method_animation_track_set_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`StringName<class_StringName>` animation **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`audio_track_get_key_end_offset<class_Animation_method_audio_track_get_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`audio_track_get_key_start_offset<class_Animation_method_audio_track_get_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Resource<class_Resource>` | :ref:`audio_track_get_key_stream<class_Animation_method_audio_track_get_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`audio_track_insert_key<class_Animation_method_audio_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Resource<class_Resource>` stream, :ref:`float<class_float>` start_offset=0, :ref:`float<class_float>` end_offset=0 **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_end_offset<class_Animation_method_audio_track_set_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_start_offset<class_Animation_method_audio_track_set_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_stream<class_Animation_method_audio_track_set_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_in_handle<class_Animation_method_bezier_track_get_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_out_handle<class_Animation_method_bezier_track_get_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`bezier_track_get_key_value<class_Animation_method_bezier_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`bezier_track_insert_key<class_Animation_method_bezier_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2( 0, 0 ), :ref:`Vector2<class_Vector2>` out_handle=Vector2( 0, 0 ) **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`bezier_track_interpolate<class_Animation_method_bezier_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_in_handle<class_Animation_method_bezier_track_set_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` in_handle **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_out_handle<class_Animation_method_bezier_track_set_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` out_handle **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_value<class_Animation_method_bezier_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` value **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear<class_Animation_method_clear>` **(** **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`copy_track<class_Animation_method_copy_track>` **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`find_track<class_Animation_method_find_track>` **(** :ref:`NodePath<class_NodePath>` path **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_method_get_track_count>` **(** **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`method_track_get_key_indices<class_Animation_method_method_track_get_key_indices>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`method_track_get_name<class_Animation_method_method_track_get_name>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`method_track_get_params<class_Animation_method_method_track_get_params>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_track<class_Animation_method_remove_track>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_method_track_find_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_get_interpolation_loop_wrap<class_Animation_method_track_get_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`InterpolationType<enum_Animation_InterpolationType>` | :ref:`track_get_interpolation_type<class_Animation_method_track_get_interpolation_type>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_method_track_get_key_count>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_method_track_get_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_method_track_get_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`track_get_key_value<class_Animation_method_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`track_get_path<class_Animation_method_track_get_path>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TrackType<enum_Animation_TrackType>` | :ref:`track_get_type<class_Animation_method_track_get_type>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_insert_key<class_Animation_method_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Variant<class_Variant>` key, :ref:`float<class_float>` transition=1 **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_method_track_is_enabled>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_method_track_is_imported>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_down<class_Animation_method_track_move_down>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_to<class_Animation_method_track_move_to>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_up<class_Animation_method_track_move_up>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_remove_key<class_Animation_method_track_remove_key>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_remove_key_at_position<class_Animation_method_track_remove_key_at_position>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` position **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_enabled<class_Animation_method_track_set_enabled>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_imported<class_Animation_method_track_set_imported>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_interpolation_loop_wrap<class_Animation_method_track_set_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` interpolation **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_interpolation_type<class_Animation_method_track_set_interpolation_type>` **(** :ref:`int<class_int>` track_idx, :ref:`InterpolationType<enum_Animation_InterpolationType>` interpolation **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_time<class_Animation_method_track_set_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` time **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_transition<class_Animation_method_track_set_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_value<class_Animation_method_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key, :ref:`Variant<class_Variant>` value **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_path<class_Animation_method_track_set_path>` **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_swap<class_Animation_method_track_swap>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`transform_track_insert_key<class_Animation_method_transform_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` location, :ref:`Quat<class_Quat>` rotation, :ref:`Vector3<class_Vector3>` scale **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`transform_track_interpolate<class_Animation_method_transform_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`value_track_get_key_indices<class_Animation_method_value_track_get_key_indices>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`UpdateMode<enum_Animation_UpdateMode>` | :ref:`value_track_get_update_mode<class_Animation_method_value_track_get_update_mode>` **(** :ref:`int<class_int>` track_idx **)** const |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`value_track_set_update_mode<class_Animation_method_value_track_set_update_mode>` **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)** |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`add_track<class_Animation_method_add_track>` **(** :ref:`TrackType<enum_Animation_TrackType>` type, :ref:`int<class_int>` at_position=-1 **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`animation_track_get_key_animation<class_Animation_method_animation_track_get_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`animation_track_insert_key<class_Animation_method_animation_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`StringName<class_StringName>` animation **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`animation_track_set_key_animation<class_Animation_method_animation_track_set_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`StringName<class_StringName>` animation **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`audio_track_get_key_end_offset<class_Animation_method_audio_track_get_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`audio_track_get_key_start_offset<class_Animation_method_audio_track_get_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Resource<class_Resource>` | :ref:`audio_track_get_key_stream<class_Animation_method_audio_track_get_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`audio_track_insert_key<class_Animation_method_audio_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Resource<class_Resource>` stream, :ref:`float<class_float>` start_offset=0, :ref:`float<class_float>` end_offset=0 **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_end_offset<class_Animation_method_audio_track_set_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_start_offset<class_Animation_method_audio_track_set_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`audio_track_set_key_stream<class_Animation_method_audio_track_set_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_in_handle<class_Animation_method_bezier_track_get_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_out_handle<class_Animation_method_bezier_track_get_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`bezier_track_get_key_value<class_Animation_method_bezier_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`bezier_track_insert_key<class_Animation_method_bezier_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2(0, 0), :ref:`Vector2<class_Vector2>` out_handle=Vector2(0, 0) **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`bezier_track_interpolate<class_Animation_method_bezier_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_in_handle<class_Animation_method_bezier_track_set_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` in_handle **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_out_handle<class_Animation_method_bezier_track_set_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` out_handle **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`bezier_track_set_key_value<class_Animation_method_bezier_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` value **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear<class_Animation_method_clear>` **(** **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`copy_track<class_Animation_method_copy_track>` **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`find_track<class_Animation_method_find_track>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_method_get_track_count>` **(** **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`method_track_get_key_indices<class_Animation_method_method_track_get_key_indices>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`method_track_get_name<class_Animation_method_method_track_get_name>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`method_track_get_params<class_Animation_method_method_track_get_params>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_track<class_Animation_method_remove_track>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_method_track_find_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_get_interpolation_loop_wrap<class_Animation_method_track_get_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`InterpolationType<enum_Animation_InterpolationType>` | :ref:`track_get_interpolation_type<class_Animation_method_track_get_interpolation_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_method_track_get_key_count>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_method_track_get_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_method_track_get_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`track_get_key_value<class_Animation_method_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`track_get_path<class_Animation_method_track_get_path>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TrackType<enum_Animation_TrackType>` | :ref:`track_get_type<class_Animation_method_track_get_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_insert_key<class_Animation_method_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Variant<class_Variant>` key, :ref:`float<class_float>` transition=1 **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_method_track_is_enabled>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_method_track_is_imported>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_down<class_Animation_method_track_move_down>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_to<class_Animation_method_track_move_to>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_move_up<class_Animation_method_track_move_up>` **(** :ref:`int<class_int>` track_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_remove_key<class_Animation_method_track_remove_key>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_remove_key_at_time<class_Animation_method_track_remove_key_at_time>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_enabled<class_Animation_method_track_set_enabled>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_imported<class_Animation_method_track_set_imported>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_interpolation_loop_wrap<class_Animation_method_track_set_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` interpolation **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_interpolation_type<class_Animation_method_track_set_interpolation_type>` **(** :ref:`int<class_int>` track_idx, :ref:`InterpolationType<enum_Animation_InterpolationType>` interpolation **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_time<class_Animation_method_track_set_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` time **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_transition<class_Animation_method_track_set_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_key_value<class_Animation_method_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key, :ref:`Variant<class_Variant>` value **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_set_path<class_Animation_method_track_set_path>` **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`track_swap<class_Animation_method_track_swap>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`transform_track_insert_key<class_Animation_method_transform_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` location, :ref:`Quaternion<class_Quaternion>` rotation, :ref:`Vector3<class_Vector3>` scale **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`transform_track_interpolate<class_Animation_method_transform_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`value_track_get_key_indices<class_Animation_method_value_track_get_key_indices>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`UpdateMode<enum_Animation_UpdateMode>` | :ref:`value_track_get_update_mode<class_Animation_method_value_track_get_update_mode>` **(** :ref:`int<class_int>` track_idx **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`value_track_interpolate<class_Animation_method_value_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`value_track_set_update_mode<class_Animation_method_value_track_set_update_mode>` **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)** |
+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Signals
-------
@@ -183,7 +200,7 @@ Enumerations
.. _class_Animation_constant_TYPE_VALUE:
.. _class_Animation_constant_TYPE_TRANSFORM:
.. _class_Animation_constant_TYPE_TRANSFORM3D:
.. _class_Animation_constant_TYPE_METHOD:
@@ -197,7 +214,7 @@ enum **TrackType**:
- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated.
- **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are interpolated.
- **TYPE_TRANSFORM3D** = **1** --- Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated.
- **TYPE_METHOD** = **2** --- Method tracks call functions with given arguments per key.
@@ -280,7 +297,7 @@ The total length of the animation (in seconds).
| *Getter* | has_loop() |
+-----------+-----------------+
A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
----
@@ -311,7 +328,7 @@ Adds a track to the Animation.
.. _class_Animation_method_animation_track_get_key_animation:
- :ref:`StringName<class_StringName>` **animation_track_get_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`StringName<class_StringName>` **animation_track_get_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the animation name at the key identified by ``key_idx``. The ``track_idx`` must be the index of an Animation Track.
@@ -335,7 +352,7 @@ Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx``
.. _class_Animation_method_audio_track_get_key_end_offset:
- :ref:`float<class_float>` **audio_track_get_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`float<class_float>` **audio_track_get_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the end offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
@@ -345,7 +362,7 @@ End offset is the number of seconds cut off at the ending of the audio stream.
.. _class_Animation_method_audio_track_get_key_start_offset:
- :ref:`float<class_float>` **audio_track_get_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`float<class_float>` **audio_track_get_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the start offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
@@ -355,7 +372,7 @@ Start offset is the number of seconds cut off at the beginning of the audio stre
.. _class_Animation_method_audio_track_get_key_stream:
- :ref:`Resource<class_Resource>` **audio_track_get_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`Resource<class_Resource>` **audio_track_get_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
@@ -391,13 +408,13 @@ Sets the start offset of the key identified by ``key_idx`` to value ``offset``.
- void **audio_track_set_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)**
Sets the stream of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track.
Sets the stream of the key identified by ``key_idx`` to value ``stream``. The ``track_idx`` must be the index of an Audio Track.
----
.. _class_Animation_method_bezier_track_get_key_in_handle:
- :ref:`Vector2<class_Vector2>` **bezier_track_get_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`Vector2<class_Vector2>` **bezier_track_get_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
@@ -405,7 +422,7 @@ Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` mu
.. _class_Animation_method_bezier_track_get_key_out_handle:
- :ref:`Vector2<class_Vector2>` **bezier_track_get_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`Vector2<class_Vector2>` **bezier_track_get_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
@@ -413,7 +430,7 @@ Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` m
.. _class_Animation_method_bezier_track_get_key_value:
- :ref:`float<class_float>` **bezier_track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`float<class_float>` **bezier_track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the value of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
@@ -421,7 +438,7 @@ Returns the value of the key identified by ``key_idx``. The ``track_idx`` must b
.. _class_Animation_method_bezier_track_insert_key:
- :ref:`int<class_int>` **bezier_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2( 0, 0 ), :ref:`Vector2<class_Vector2>` out_handle=Vector2( 0, 0 ) **)**
- :ref:`int<class_int>` **bezier_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2(0, 0), :ref:`Vector2<class_Vector2>` out_handle=Vector2(0, 0) **)**
Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track.
@@ -431,7 +448,7 @@ Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` m
.. _class_Animation_method_bezier_track_interpolate:
- :ref:`float<class_float>` **bezier_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** const
- :ref:`float<class_float>` **bezier_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |const|
Returns the interpolated value at the given ``time`` (in seconds). The ``track_idx`` must be the index of a Bezier Track.
@@ -479,7 +496,7 @@ Adds a new track that is a copy of the given track from ``to_animation``.
.. _class_Animation_method_find_track:
- :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_NodePath>` path **)** const
- :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
Returns the index of the specified track. If the track is not found, return -1.
@@ -487,7 +504,7 @@ Returns the index of the specified track. If the track is not found, return -1.
.. _class_Animation_method_get_track_count:
- :ref:`int<class_int>` **get_track_count** **(** **)** const
- :ref:`int<class_int>` **get_track_count** **(** **)** |const|
Returns the amount of tracks in the animation.
@@ -495,7 +512,7 @@ Returns the amount of tracks in the animation.
.. _class_Animation_method_method_track_get_key_indices:
- :ref:`PackedInt32Array<class_PackedInt32Array>` **method_track_get_key_indices** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
- :ref:`PackedInt32Array<class_PackedInt32Array>` **method_track_get_key_indices** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** |const|
Returns all the key indices of a method track, given a position and delta time.
@@ -503,7 +520,7 @@ Returns all the key indices of a method track, given a position and delta time.
.. _class_Animation_method_method_track_get_name:
- :ref:`StringName<class_StringName>` **method_track_get_name** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`StringName<class_StringName>` **method_track_get_name** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the method name of a method track.
@@ -511,7 +528,7 @@ Returns the method name of a method track.
.. _class_Animation_method_method_track_get_params:
- :ref:`Array<class_Array>` **method_track_get_params** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`Array<class_Array>` **method_track_get_params** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the arguments values to be called on a method track for a given key in a given track.
@@ -527,7 +544,7 @@ Removes a track by specifying the track index.
.. _class_Animation_method_track_find_key:
- :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const
- :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** |const|
Finds the key index by time in a given track. Optionally, only find it if the exact time is given.
@@ -535,7 +552,7 @@ Finds the key index by time in a given track. Optionally, only find it if the ex
.. _class_Animation_method_track_get_interpolation_loop_wrap:
- :ref:`bool<class_bool>` **track_get_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`bool<class_bool>` **track_get_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns ``true`` if the track at ``idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default.
@@ -543,7 +560,7 @@ Returns ``true`` if the track at ``idx`` wraps the interpolation loop. New track
.. _class_Animation_method_track_get_interpolation_type:
- :ref:`InterpolationType<enum_Animation_InterpolationType>` **track_get_interpolation_type** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`InterpolationType<enum_Animation_InterpolationType>` **track_get_interpolation_type** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns the interpolation type of a given track.
@@ -551,7 +568,7 @@ Returns the interpolation type of a given track.
.. _class_Animation_method_track_get_key_count:
- :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns the amount of keys in a given track.
@@ -559,7 +576,7 @@ Returns the amount of keys in a given track.
.. _class_Animation_method_track_get_key_time:
- :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the time at which the key is located.
@@ -567,15 +584,15 @@ Returns the time at which the key is located.
.. _class_Animation_method_track_get_key_transition:
- :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GDScript.ease<class_@GDScript_method_ease>`).
Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
----
.. _class_Animation_method_track_get_key_value:
- :ref:`Variant<class_Variant>` **track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** const
- :ref:`Variant<class_Variant>` **track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
Returns the value of a given key in a given track.
@@ -583,7 +600,7 @@ Returns the value of a given key in a given track.
.. _class_Animation_method_track_get_path:
- :ref:`NodePath<class_NodePath>` **track_get_path** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`NodePath<class_NodePath>` **track_get_path** **(** :ref:`int<class_int>` track_idx **)** |const|
Gets the path of a track. For more information on the path format, see :ref:`track_set_path<class_Animation_method_track_set_path>`.
@@ -591,7 +608,7 @@ Gets the path of a track. For more information on the path format, see :ref:`tra
.. _class_Animation_method_track_get_type:
- :ref:`TrackType<enum_Animation_TrackType>` **track_get_type** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`TrackType<enum_Animation_TrackType>` **track_get_type** **(** :ref:`int<class_int>` track_idx **)** |const|
Gets the type of a track.
@@ -607,7 +624,7 @@ Insert a generic key in a given track.
.. _class_Animation_method_track_is_enabled:
- :ref:`bool<class_bool>` **track_is_enabled** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`bool<class_bool>` **track_is_enabled** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns ``true`` if the track at index ``idx`` is enabled.
@@ -615,7 +632,7 @@ Returns ``true`` if the track at index ``idx`` is enabled.
.. _class_Animation_method_track_is_imported:
- :ref:`bool<class_bool>` **track_is_imported** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`bool<class_bool>` **track_is_imported** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns ``true`` if the given track is imported. Else, return ``false``.
@@ -653,11 +670,11 @@ Removes a key by index in a given track.
----
.. _class_Animation_method_track_remove_key_at_position:
.. _class_Animation_method_track_remove_key_at_time:
- void **track_remove_key_at_position** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` position **)**
- void **track_remove_key_at_time** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)**
Removes a key by position (seconds) in a given track.
Removes a key at ``time`` in a given track.
----
@@ -705,7 +722,7 @@ Sets the time of an existing key.
- void **track_set_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)**
Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GDScript.ease<class_@GDScript_method_ease>`).
Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
----
@@ -721,7 +738,7 @@ Sets the value of an existing key.
- void **track_set_path** **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)**
Sets 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 ``":"``.
Sets 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 ``":"``.
For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``.
@@ -737,7 +754,7 @@ Swaps the track ``idx``'s index position with the track ``with_idx``.
.. _class_Animation_method_transform_track_insert_key:
- :ref:`int<class_int>` **transform_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` location, :ref:`Quat<class_Quat>` rotation, :ref:`Vector3<class_Vector3>` scale **)**
- :ref:`int<class_int>` **transform_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` location, :ref:`Quaternion<class_Quaternion>` rotation, :ref:`Vector3<class_Vector3>` scale **)**
Insert a transform key for a transform track.
@@ -745,15 +762,15 @@ Insert a transform key for a transform track.
.. _class_Animation_method_transform_track_interpolate:
- :ref:`Array<class_Array>` **transform_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** const
- :ref:`Array<class_Array>` **transform_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3<class_Vector3>`), rotation (:ref:`Quat<class_Quat>`) and scale (:ref:`Vector3<class_Vector3>`).
Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3<class_Vector3>`), rotation (:ref:`Quaternion<class_Quaternion>`) and scale (:ref:`Vector3<class_Vector3>`).
----
.. _class_Animation_method_value_track_get_key_indices:
- :ref:`PackedInt32Array<class_PackedInt32Array>` **value_track_get_key_indices** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
- :ref:`PackedInt32Array<class_PackedInt32Array>` **value_track_get_key_indices** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** |const|
Returns all the key indices of a value track, given a position and delta time.
@@ -761,15 +778,29 @@ Returns all the key indices of a value track, given a position and delta time.
.. _class_Animation_method_value_track_get_update_mode:
- :ref:`UpdateMode<enum_Animation_UpdateMode>` **value_track_get_update_mode** **(** :ref:`int<class_int>` track_idx **)** const
- :ref:`UpdateMode<enum_Animation_UpdateMode>` **value_track_get_update_mode** **(** :ref:`int<class_int>` track_idx **)** |const|
Returns the update mode of a value track.
----
.. _class_Animation_method_value_track_interpolate:
- :ref:`Variant<class_Variant>` **value_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track.
----
.. _class_Animation_method_value_track_set_update_mode:
- void **value_track_set_update_mode** **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)**
Sets the update mode (see :ref:`UpdateMode<enum_Animation_UpdateMode>`) of a value track.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`