class_animation.rst 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/Animation.xml.
  6. .. _class_Animation:
  7. Animation
  8. =========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Holds data that can be used to animate anything in the engine.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. .. tabs::
  16. .. code-tab:: gdscript
  17. # This creates an animation that makes the node "Enemy" move to the right by
  18. # 100 pixels in 2.0 seconds.
  19. var animation = Animation.new()
  20. var track_index = animation.add_track(Animation.TYPE_VALUE)
  21. animation.track_set_path(track_index, "Enemy:position:x")
  22. animation.track_insert_key(track_index, 0.0, 0)
  23. animation.track_insert_key(track_index, 2.0, 100)
  24. animation.length = 2.0
  25. .. code-tab:: csharp
  26. // This creates an animation that makes the node "Enemy" move to the right by
  27. // 100 pixels in 2.0 seconds.
  28. var animation = new Animation();
  29. int trackIndex = animation.AddTrack(Animation.TrackType.Value);
  30. animation.TrackSetPath(trackIndex, "Enemy:position:x");
  31. animation.TrackInsertKey(trackIndex, 0.0f, 0);
  32. animation.TrackInsertKey(trackIndex, 2.0f, 100);
  33. animation.Length = 2.0f;
  34. 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.
  35. \ **Note:** For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` and :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` track types instead of :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>` is recommended for performance reasons.
  36. .. rst-class:: classref-introduction-group
  37. Tutorials
  38. ---------
  39. - :doc:`Animation documentation index <../tutorials/animation/index>`
  40. .. rst-class:: classref-reftable-group
  41. Properties
  42. ----------
  43. .. table::
  44. :widths: auto
  45. +------------------------------------------+------------------------------------------------------+---------+
  46. | :ref:`float<class_float>` | :ref:`length<class_Animation_property_length>` | ``1.0`` |
  47. +------------------------------------------+------------------------------------------------------+---------+
  48. | :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_Animation_property_loop_mode>` | ``0`` |
  49. +------------------------------------------+------------------------------------------------------+---------+
  50. | :ref:`float<class_float>` | :ref:`step<class_Animation_property_step>` | ``0.1`` |
  51. +------------------------------------------+------------------------------------------------------+---------+
  52. .. rst-class:: classref-reftable-group
  53. Methods
  54. -------
  55. .. table::
  56. :widths: auto
  57. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :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 **)** |
  59. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :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| |
  61. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :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 **)** |
  63. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | 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 **)** |
  65. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :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| |
  67. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :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| |
  69. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :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| |
  71. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :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 **)** |
  73. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`audio_track_is_use_blend<class_Animation_method_audio_track_is_use_blend>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  75. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | 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 **)** |
  77. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | 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 **)** |
  79. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | 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 **)** |
  81. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`audio_track_set_use_blend<class_Animation_method_audio_track_set_use_blend>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enable **)** |
  83. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :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| |
  85. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :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| |
  87. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :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| |
  89. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :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) **)** |
  91. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :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| |
  93. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | 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, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)** |
  95. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | 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, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)** |
  97. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | 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 **)** |
  99. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`int<class_int>` | :ref:`blend_shape_track_insert_key<class_Animation_method_blend_shape_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` amount **)** |
  101. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`float<class_float>` | :ref:`blend_shape_track_interpolate<class_Animation_method_blend_shape_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  103. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`clear<class_Animation_method_clear>` **(** **)** |
  105. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`compress<class_Animation_method_compress>` **(** :ref:`int<class_int>` page_size=8192, :ref:`int<class_int>` fps=120, :ref:`float<class_float>` split_tolerance=4.0 **)** |
  107. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | void | :ref:`copy_track<class_Animation_method_copy_track>` **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)** |
  109. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`find_track<class_Animation_method_find_track>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`TrackType<enum_Animation_TrackType>` type **)** |const| |
  111. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_method_get_track_count>` **(** **)** |const| |
  113. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :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| |
  115. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :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| |
  117. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`int<class_int>` | :ref:`position_track_insert_key<class_Animation_method_position_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` position **)** |
  119. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`Vector3<class_Vector3>` | :ref:`position_track_interpolate<class_Animation_method_position_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  121. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | void | :ref:`remove_track<class_Animation_method_remove_track>` **(** :ref:`int<class_int>` track_idx **)** |
  123. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`int<class_int>` | :ref:`rotation_track_insert_key<class_Animation_method_rotation_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Quaternion<class_Quaternion>` rotation **)** |
  125. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation_track_interpolate<class_Animation_method_rotation_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  127. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`int<class_int>` | :ref:`scale_track_insert_key<class_Animation_method_scale_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` scale **)** |
  129. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`Vector3<class_Vector3>` | :ref:`scale_track_interpolate<class_Animation_method_scale_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  131. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :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:`FindMode<enum_Animation_FindMode>` find_mode=0 **)** |const| |
  133. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :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| |
  135. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`InterpolationType<enum_Animation_InterpolationType>` | :ref:`track_get_interpolation_type<class_Animation_method_track_get_interpolation_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  137. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_method_track_get_key_count>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  139. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :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| |
  141. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :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| |
  143. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :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| |
  145. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`NodePath<class_NodePath>` | :ref:`track_get_path<class_Animation_method_track_get_path>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  147. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`TrackType<enum_Animation_TrackType>` | :ref:`track_get_type<class_Animation_method_track_get_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  149. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`int<class_int>` | :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 **)** |
  151. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`track_is_compressed<class_Animation_method_track_is_compressed>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  153. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_method_track_is_enabled>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  155. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_method_track_is_imported>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  157. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`track_move_down<class_Animation_method_track_move_down>` **(** :ref:`int<class_int>` track_idx **)** |
  159. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`track_move_to<class_Animation_method_track_move_to>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)** |
  161. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`track_move_up<class_Animation_method_track_move_up>` **(** :ref:`int<class_int>` track_idx **)** |
  163. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`track_remove_key<class_Animation_method_track_remove_key>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |
  165. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | 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 **)** |
  167. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`track_set_enabled<class_Animation_method_track_set_enabled>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)** |
  169. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`track_set_imported<class_Animation_method_track_set_imported>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)** |
  171. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | 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 **)** |
  173. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | 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 **)** |
  175. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | 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 **)** |
  177. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | 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 **)** |
  179. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | 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 **)** |
  181. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`track_set_path<class_Animation_method_track_set_path>` **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)** |
  183. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`track_swap<class_Animation_method_track_swap>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)** |
  185. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :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| |
  187. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | :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| |
  189. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | 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 **)** |
  191. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. .. rst-class:: classref-section-separator
  193. ----
  194. .. rst-class:: classref-descriptions-group
  195. Enumerations
  196. ------------
  197. .. _enum_Animation_TrackType:
  198. .. rst-class:: classref-enumeration
  199. enum **TrackType**:
  200. .. _class_Animation_constant_TYPE_VALUE:
  201. .. rst-class:: classref-enumeration-constant
  202. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_VALUE** = ``0``
  203. Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` and :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` track types instead of :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>` is recommended for performance reasons.
  204. .. _class_Animation_constant_TYPE_POSITION_3D:
  205. .. rst-class:: classref-enumeration-constant
  206. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_POSITION_3D** = ``1``
  207. 3D position track (values are stored in :ref:`Vector3<class_Vector3>`\ s).
  208. .. _class_Animation_constant_TYPE_ROTATION_3D:
  209. .. rst-class:: classref-enumeration-constant
  210. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_ROTATION_3D** = ``2``
  211. 3D rotation track (values are stored in :ref:`Quaternion<class_Quaternion>`\ s).
  212. .. _class_Animation_constant_TYPE_SCALE_3D:
  213. .. rst-class:: classref-enumeration-constant
  214. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_SCALE_3D** = ``3``
  215. 3D scale track (values are stored in :ref:`Vector3<class_Vector3>`\ s).
  216. .. _class_Animation_constant_TYPE_BLEND_SHAPE:
  217. .. rst-class:: classref-enumeration-constant
  218. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_BLEND_SHAPE** = ``4``
  219. Blend shape track.
  220. .. _class_Animation_constant_TYPE_METHOD:
  221. .. rst-class:: classref-enumeration-constant
  222. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_METHOD** = ``5``
  223. Method tracks call functions with given arguments per key.
  224. .. _class_Animation_constant_TYPE_BEZIER:
  225. .. rst-class:: classref-enumeration-constant
  226. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_BEZIER** = ``6``
  227. 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 :ref:`Color<class_Color>`).
  228. .. _class_Animation_constant_TYPE_AUDIO:
  229. .. rst-class:: classref-enumeration-constant
  230. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_AUDIO** = ``7``
  231. Audio tracks are used to play an audio stream with either type of :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`. The stream can be trimmed and previewed in the animation.
  232. .. _class_Animation_constant_TYPE_ANIMATION:
  233. .. rst-class:: classref-enumeration-constant
  234. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_ANIMATION** = ``8``
  235. Animation tracks play animations in other :ref:`AnimationPlayer<class_AnimationPlayer>` nodes.
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _enum_Animation_InterpolationType:
  239. .. rst-class:: classref-enumeration
  240. enum **InterpolationType**:
  241. .. _class_Animation_constant_INTERPOLATION_NEAREST:
  242. .. rst-class:: classref-enumeration-constant
  243. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_NEAREST** = ``0``
  244. No interpolation (nearest value).
  245. .. _class_Animation_constant_INTERPOLATION_LINEAR:
  246. .. rst-class:: classref-enumeration-constant
  247. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR** = ``1``
  248. Linear interpolation.
  249. .. _class_Animation_constant_INTERPOLATION_CUBIC:
  250. .. rst-class:: classref-enumeration-constant
  251. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC** = ``2``
  252. Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to :ref:`INTERPOLATION_LINEAR<class_Animation_constant_INTERPOLATION_LINEAR>` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
  253. .. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE:
  254. .. rst-class:: classref-enumeration-constant
  255. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR_ANGLE** = ``3``
  256. Linear interpolation with shortest path rotation.
  257. \ **Note:** The result value is always normalized and may not match the key value.
  258. .. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE:
  259. .. rst-class:: classref-enumeration-constant
  260. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC_ANGLE** = ``4``
  261. Cubic interpolation with shortest path rotation.
  262. \ **Note:** The result value is always normalized and may not match the key value.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _enum_Animation_UpdateMode:
  266. .. rst-class:: classref-enumeration
  267. enum **UpdateMode**:
  268. .. _class_Animation_constant_UPDATE_CONTINUOUS:
  269. .. rst-class:: classref-enumeration-constant
  270. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CONTINUOUS** = ``0``
  271. Update between keyframes and hold the value.
  272. .. _class_Animation_constant_UPDATE_DISCRETE:
  273. .. rst-class:: classref-enumeration-constant
  274. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_DISCRETE** = ``1``
  275. Update at the keyframes.
  276. .. _class_Animation_constant_UPDATE_CAPTURE:
  277. .. rst-class:: classref-enumeration-constant
  278. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CAPTURE** = ``2``
  279. Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _enum_Animation_LoopMode:
  283. .. rst-class:: classref-enumeration
  284. enum **LoopMode**:
  285. .. _class_Animation_constant_LOOP_NONE:
  286. .. rst-class:: classref-enumeration-constant
  287. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_NONE** = ``0``
  288. At both ends of the animation, the animation will stop playing.
  289. .. _class_Animation_constant_LOOP_LINEAR:
  290. .. rst-class:: classref-enumeration-constant
  291. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_LINEAR** = ``1``
  292. At both ends of the animation, the animation will be repeated without changing the playback direction.
  293. .. _class_Animation_constant_LOOP_PINGPONG:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_PINGPONG** = ``2``
  296. Repeats playback and reverse playback at both ends of the animation.
  297. .. rst-class:: classref-item-separator
  298. ----
  299. .. _enum_Animation_LoopedFlag:
  300. .. rst-class:: classref-enumeration
  301. enum **LoopedFlag**:
  302. .. _class_Animation_constant_LOOPED_FLAG_NONE:
  303. .. rst-class:: classref-enumeration-constant
  304. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_NONE** = ``0``
  305. This flag indicates that the animation proceeds without any looping.
  306. .. _class_Animation_constant_LOOPED_FLAG_END:
  307. .. rst-class:: classref-enumeration-constant
  308. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_END** = ``1``
  309. This flag indicates that the animation has reached the end of the animation and just after loop processed.
  310. .. _class_Animation_constant_LOOPED_FLAG_START:
  311. .. rst-class:: classref-enumeration-constant
  312. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_START** = ``2``
  313. This flag indicates that the animation has reached the start of the animation and just after loop processed.
  314. .. rst-class:: classref-item-separator
  315. ----
  316. .. _enum_Animation_FindMode:
  317. .. rst-class:: classref-enumeration
  318. enum **FindMode**:
  319. .. _class_Animation_constant_FIND_MODE_NEAREST:
  320. .. rst-class:: classref-enumeration-constant
  321. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_NEAREST** = ``0``
  322. Finds the nearest time key.
  323. .. _class_Animation_constant_FIND_MODE_APPROX:
  324. .. rst-class:: classref-enumeration-constant
  325. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_APPROX** = ``1``
  326. Finds only the key with approximating the time.
  327. .. _class_Animation_constant_FIND_MODE_EXACT:
  328. .. rst-class:: classref-enumeration-constant
  329. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_EXACT** = ``2``
  330. Finds only the key with matching the time.
  331. .. rst-class:: classref-section-separator
  332. ----
  333. .. rst-class:: classref-descriptions-group
  334. Property Descriptions
  335. ---------------------
  336. .. _class_Animation_property_length:
  337. .. rst-class:: classref-property
  338. :ref:`float<class_float>` **length** = ``1.0``
  339. .. rst-class:: classref-property-setget
  340. - void **set_length** **(** :ref:`float<class_float>` value **)**
  341. - :ref:`float<class_float>` **get_length** **(** **)**
  342. The total length of the animation (in seconds).
  343. \ **Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
  344. .. rst-class:: classref-item-separator
  345. ----
  346. .. _class_Animation_property_loop_mode:
  347. .. rst-class:: classref-property
  348. :ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode** = ``0``
  349. .. rst-class:: classref-property-setget
  350. - void **set_loop_mode** **(** :ref:`LoopMode<enum_Animation_LoopMode>` value **)**
  351. - :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode** **(** **)**
  352. 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.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_Animation_property_step:
  356. .. rst-class:: classref-property
  357. :ref:`float<class_float>` **step** = ``0.1``
  358. .. rst-class:: classref-property-setget
  359. - void **set_step** **(** :ref:`float<class_float>` value **)**
  360. - :ref:`float<class_float>` **get_step** **(** **)**
  361. The animation step value.
  362. .. rst-class:: classref-section-separator
  363. ----
  364. .. rst-class:: classref-descriptions-group
  365. Method Descriptions
  366. -------------------
  367. .. _class_Animation_method_add_track:
  368. .. rst-class:: classref-method
  369. :ref:`int<class_int>` **add_track** **(** :ref:`TrackType<enum_Animation_TrackType>` type, :ref:`int<class_int>` at_position=-1 **)**
  370. Adds a track to the Animation.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_Animation_method_animation_track_get_key_animation:
  374. .. rst-class:: classref-method
  375. :ref:`StringName<class_StringName>` **animation_track_get_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  376. Returns the animation name at the key identified by ``key_idx``. The ``track_idx`` must be the index of an Animation Track.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_Animation_method_animation_track_insert_key:
  380. .. rst-class:: classref-method
  381. :ref:`int<class_int>` **animation_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`StringName<class_StringName>` animation **)**
  382. Inserts a key with value ``animation`` at the given ``time`` (in seconds). The ``track_idx`` must be the index of an Animation Track.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_Animation_method_animation_track_set_key_animation:
  386. .. rst-class:: classref-method
  387. void **animation_track_set_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`StringName<class_StringName>` animation **)**
  388. Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx`` must be the index of an Animation Track.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_Animation_method_audio_track_get_key_end_offset:
  392. .. rst-class:: classref-method
  393. :ref:`float<class_float>` **audio_track_get_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  394. Returns the end offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  395. End offset is the number of seconds cut off at the ending of the audio stream.
  396. .. rst-class:: classref-item-separator
  397. ----
  398. .. _class_Animation_method_audio_track_get_key_start_offset:
  399. .. rst-class:: classref-method
  400. :ref:`float<class_float>` **audio_track_get_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  401. Returns the start offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  402. Start offset is the number of seconds cut off at the beginning of the audio stream.
  403. .. rst-class:: classref-item-separator
  404. ----
  405. .. _class_Animation_method_audio_track_get_key_stream:
  406. .. rst-class:: classref-method
  407. :ref:`Resource<class_Resource>` **audio_track_get_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  408. Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  409. .. rst-class:: classref-item-separator
  410. ----
  411. .. _class_Animation_method_audio_track_insert_key:
  412. .. rst-class:: classref-method
  413. :ref:`int<class_int>` **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 **)**
  414. Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of an Audio Track.
  415. \ ``stream`` is the :ref:`AudioStream<class_AudioStream>` resource to play. ``start_offset`` is the number of seconds cut off at the beginning of the audio stream, while ``end_offset`` is at the ending.
  416. .. rst-class:: classref-item-separator
  417. ----
  418. .. _class_Animation_method_audio_track_is_use_blend:
  419. .. rst-class:: classref-method
  420. :ref:`bool<class_bool>` **audio_track_is_use_blend** **(** :ref:`int<class_int>` track_idx **)** |const|
  421. Returns ``true`` if the track at ``track_idx`` will be blended with other animations.
  422. .. rst-class:: classref-item-separator
  423. ----
  424. .. _class_Animation_method_audio_track_set_key_end_offset:
  425. .. rst-class:: classref-method
  426. void **audio_track_set_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)**
  427. Sets the end offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track.
  428. .. rst-class:: classref-item-separator
  429. ----
  430. .. _class_Animation_method_audio_track_set_key_start_offset:
  431. .. rst-class:: classref-method
  432. void **audio_track_set_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)**
  433. Sets the start offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track.
  434. .. rst-class:: classref-item-separator
  435. ----
  436. .. _class_Animation_method_audio_track_set_key_stream:
  437. .. rst-class:: classref-method
  438. void **audio_track_set_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)**
  439. Sets the stream of the key identified by ``key_idx`` to value ``stream``. The ``track_idx`` must be the index of an Audio Track.
  440. .. rst-class:: classref-item-separator
  441. ----
  442. .. _class_Animation_method_audio_track_set_use_blend:
  443. .. rst-class:: classref-method
  444. void **audio_track_set_use_blend** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enable **)**
  445. Sets whether the track will be blended with other animations. If ``true``, the audio playback volume changes depending on the blend value.
  446. .. rst-class:: classref-item-separator
  447. ----
  448. .. _class_Animation_method_bezier_track_get_key_in_handle:
  449. .. rst-class:: classref-method
  450. :ref:`Vector2<class_Vector2>` **bezier_track_get_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  451. Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _class_Animation_method_bezier_track_get_key_out_handle:
  455. .. rst-class:: classref-method
  456. :ref:`Vector2<class_Vector2>` **bezier_track_get_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  457. Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _class_Animation_method_bezier_track_get_key_value:
  461. .. rst-class:: classref-method
  462. :ref:`float<class_float>` **bezier_track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  463. Returns the value of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  464. .. rst-class:: classref-item-separator
  465. ----
  466. .. _class_Animation_method_bezier_track_insert_key:
  467. .. rst-class:: classref-method
  468. :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) **)**
  469. Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track.
  470. \ ``in_handle`` is the left-side weight of the added Bezier curve point, ``out_handle`` is the right-side one, while ``value`` is the actual value at this point.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_Animation_method_bezier_track_interpolate:
  474. .. rst-class:: classref-method
  475. :ref:`float<class_float>` **bezier_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |const|
  476. Returns the interpolated value at the given ``time`` (in seconds). The ``track_idx`` must be the index of a Bezier Track.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_Animation_method_bezier_track_set_key_in_handle:
  480. .. rst-class:: classref-method
  481. void **bezier_track_set_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` in_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)**
  482. Sets the in handle of the key identified by ``key_idx`` to value ``in_handle``. The ``track_idx`` must be the index of a Bezier Track.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_Animation_method_bezier_track_set_key_out_handle:
  486. .. rst-class:: classref-method
  487. void **bezier_track_set_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` out_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)**
  488. Sets the out handle of the key identified by ``key_idx`` to value ``out_handle``. The ``track_idx`` must be the index of a Bezier Track.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_Animation_method_bezier_track_set_key_value:
  492. .. rst-class:: classref-method
  493. void **bezier_track_set_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` value **)**
  494. Sets the value of the key identified by ``key_idx`` to the given value. The ``track_idx`` must be the index of a Bezier Track.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_Animation_method_blend_shape_track_insert_key:
  498. .. rst-class:: classref-method
  499. :ref:`int<class_int>` **blend_shape_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` amount **)**
  500. Inserts a key in a given blend shape track. Returns the key index.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_Animation_method_blend_shape_track_interpolate:
  504. .. rst-class:: classref-method
  505. :ref:`float<class_float>` **blend_shape_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  506. Returns the interpolated blend shape value at the given time (in seconds). The ``track_idx`` must be the index of a blend shape track.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_Animation_method_clear:
  510. .. rst-class:: classref-method
  511. void **clear** **(** **)**
  512. Clear the animation (clear all tracks and reset all).
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_Animation_method_compress:
  516. .. rst-class:: classref-method
  517. void **compress** **(** :ref:`int<class_int>` page_size=8192, :ref:`int<class_int>` fps=120, :ref:`float<class_float>` split_tolerance=4.0 **)**
  518. Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed<class_Animation_method_track_is_compressed>` return ``true`` 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.
  519. \ **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.
  520. .. rst-class:: classref-item-separator
  521. ----
  522. .. _class_Animation_method_copy_track:
  523. .. rst-class:: classref-method
  524. void **copy_track** **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)**
  525. Adds a new track to ``to_animation`` that is a copy of the given track from this animation.
  526. .. rst-class:: classref-item-separator
  527. ----
  528. .. _class_Animation_method_find_track:
  529. .. rst-class:: classref-method
  530. :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_NodePath>` path, :ref:`TrackType<enum_Animation_TrackType>` type **)** |const|
  531. Returns the index of the specified track. If the track is not found, return -1.
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_Animation_method_get_track_count:
  535. .. rst-class:: classref-method
  536. :ref:`int<class_int>` **get_track_count** **(** **)** |const|
  537. Returns the amount of tracks in the animation.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_Animation_method_method_track_get_name:
  541. .. rst-class:: classref-method
  542. :ref:`StringName<class_StringName>` **method_track_get_name** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  543. Returns the method name of a method track.
  544. .. rst-class:: classref-item-separator
  545. ----
  546. .. _class_Animation_method_method_track_get_params:
  547. .. rst-class:: classref-method
  548. :ref:`Array<class_Array>` **method_track_get_params** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  549. Returns the arguments values to be called on a method track for a given key in a given track.
  550. .. rst-class:: classref-item-separator
  551. ----
  552. .. _class_Animation_method_position_track_insert_key:
  553. .. rst-class:: classref-method
  554. :ref:`int<class_int>` **position_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` position **)**
  555. Inserts a key in a given 3D position track. Returns the key index.
  556. .. rst-class:: classref-item-separator
  557. ----
  558. .. _class_Animation_method_position_track_interpolate:
  559. .. rst-class:: classref-method
  560. :ref:`Vector3<class_Vector3>` **position_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  561. Returns the interpolated position value at the given time (in seconds). The ``track_idx`` must be the index of a 3D position track.
  562. .. rst-class:: classref-item-separator
  563. ----
  564. .. _class_Animation_method_remove_track:
  565. .. rst-class:: classref-method
  566. void **remove_track** **(** :ref:`int<class_int>` track_idx **)**
  567. Removes a track by specifying the track index.
  568. .. rst-class:: classref-item-separator
  569. ----
  570. .. _class_Animation_method_rotation_track_insert_key:
  571. .. rst-class:: classref-method
  572. :ref:`int<class_int>` **rotation_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Quaternion<class_Quaternion>` rotation **)**
  573. Inserts a key in a given 3D rotation track. Returns the key index.
  574. .. rst-class:: classref-item-separator
  575. ----
  576. .. _class_Animation_method_rotation_track_interpolate:
  577. .. rst-class:: classref-method
  578. :ref:`Quaternion<class_Quaternion>` **rotation_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  579. Returns the interpolated rotation value at the given time (in seconds). The ``track_idx`` must be the index of a 3D rotation track.
  580. .. rst-class:: classref-item-separator
  581. ----
  582. .. _class_Animation_method_scale_track_insert_key:
  583. .. rst-class:: classref-method
  584. :ref:`int<class_int>` **scale_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` scale **)**
  585. Inserts a key in a given 3D scale track. Returns the key index.
  586. .. rst-class:: classref-item-separator
  587. ----
  588. .. _class_Animation_method_scale_track_interpolate:
  589. .. rst-class:: classref-method
  590. :ref:`Vector3<class_Vector3>` **scale_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  591. Returns the interpolated scale value at the given time (in seconds). The ``track_idx`` must be the index of a 3D scale track.
  592. .. rst-class:: classref-item-separator
  593. ----
  594. .. _class_Animation_method_track_find_key:
  595. .. rst-class:: classref-method
  596. :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`FindMode<enum_Animation_FindMode>` find_mode=0 **)** |const|
  597. Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given.
  598. .. rst-class:: classref-item-separator
  599. ----
  600. .. _class_Animation_method_track_get_interpolation_loop_wrap:
  601. .. rst-class:: classref-method
  602. :ref:`bool<class_bool>` **track_get_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx **)** |const|
  603. Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default.
  604. .. rst-class:: classref-item-separator
  605. ----
  606. .. _class_Animation_method_track_get_interpolation_type:
  607. .. rst-class:: classref-method
  608. :ref:`InterpolationType<enum_Animation_InterpolationType>` **track_get_interpolation_type** **(** :ref:`int<class_int>` track_idx **)** |const|
  609. Returns the interpolation type of a given track.
  610. .. rst-class:: classref-item-separator
  611. ----
  612. .. _class_Animation_method_track_get_key_count:
  613. .. rst-class:: classref-method
  614. :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` track_idx **)** |const|
  615. Returns the number of keys in a given track.
  616. .. rst-class:: classref-item-separator
  617. ----
  618. .. _class_Animation_method_track_get_key_time:
  619. .. rst-class:: classref-method
  620. :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  621. Returns the time at which the key is located.
  622. .. rst-class:: classref-item-separator
  623. ----
  624. .. _class_Animation_method_track_get_key_transition:
  625. .. rst-class:: classref-method
  626. :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  627. Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
  628. .. rst-class:: classref-item-separator
  629. ----
  630. .. _class_Animation_method_track_get_key_value:
  631. .. rst-class:: classref-method
  632. :ref:`Variant<class_Variant>` **track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  633. Returns the value of a given key in a given track.
  634. .. rst-class:: classref-item-separator
  635. ----
  636. .. _class_Animation_method_track_get_path:
  637. .. rst-class:: classref-method
  638. :ref:`NodePath<class_NodePath>` **track_get_path** **(** :ref:`int<class_int>` track_idx **)** |const|
  639. Gets the path of a track. For more information on the path format, see :ref:`track_set_path<class_Animation_method_track_set_path>`.
  640. .. rst-class:: classref-item-separator
  641. ----
  642. .. _class_Animation_method_track_get_type:
  643. .. rst-class:: classref-method
  644. :ref:`TrackType<enum_Animation_TrackType>` **track_get_type** **(** :ref:`int<class_int>` track_idx **)** |const|
  645. Gets the type of a track.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _class_Animation_method_track_insert_key:
  649. .. rst-class:: classref-method
  650. :ref:`int<class_int>` **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 **)**
  651. Inserts a generic key in a given track. Returns the key index.
  652. .. rst-class:: classref-item-separator
  653. ----
  654. .. _class_Animation_method_track_is_compressed:
  655. .. rst-class:: classref-method
  656. :ref:`bool<class_bool>` **track_is_compressed** **(** :ref:`int<class_int>` track_idx **)** |const|
  657. Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress<class_Animation_method_compress>`.
  658. .. rst-class:: classref-item-separator
  659. ----
  660. .. _class_Animation_method_track_is_enabled:
  661. .. rst-class:: classref-method
  662. :ref:`bool<class_bool>` **track_is_enabled** **(** :ref:`int<class_int>` track_idx **)** |const|
  663. Returns ``true`` if the track at index ``track_idx`` is enabled.
  664. .. rst-class:: classref-item-separator
  665. ----
  666. .. _class_Animation_method_track_is_imported:
  667. .. rst-class:: classref-method
  668. :ref:`bool<class_bool>` **track_is_imported** **(** :ref:`int<class_int>` track_idx **)** |const|
  669. Returns ``true`` if the given track is imported. Else, return ``false``.
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _class_Animation_method_track_move_down:
  673. .. rst-class:: classref-method
  674. void **track_move_down** **(** :ref:`int<class_int>` track_idx **)**
  675. Moves a track down.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_Animation_method_track_move_to:
  679. .. rst-class:: classref-method
  680. void **track_move_to** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)**
  681. Changes the index position of track ``track_idx`` to the one defined in ``to_idx``.
  682. .. rst-class:: classref-item-separator
  683. ----
  684. .. _class_Animation_method_track_move_up:
  685. .. rst-class:: classref-method
  686. void **track_move_up** **(** :ref:`int<class_int>` track_idx **)**
  687. Moves a track up.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_Animation_method_track_remove_key:
  691. .. rst-class:: classref-method
  692. void **track_remove_key** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)**
  693. Removes a key by index in a given track.
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_Animation_method_track_remove_key_at_time:
  697. .. rst-class:: classref-method
  698. void **track_remove_key_at_time** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)**
  699. Removes a key at ``time`` in a given track.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_Animation_method_track_set_enabled:
  703. .. rst-class:: classref-method
  704. void **track_set_enabled** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)**
  705. Enables/disables the given track. Tracks are enabled by default.
  706. .. rst-class:: classref-item-separator
  707. ----
  708. .. _class_Animation_method_track_set_imported:
  709. .. rst-class:: classref-method
  710. void **track_set_imported** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)**
  711. Sets the given track as imported or not.
  712. .. rst-class:: classref-item-separator
  713. ----
  714. .. _class_Animation_method_track_set_interpolation_loop_wrap:
  715. .. rst-class:: classref-method
  716. void **track_set_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` interpolation **)**
  717. If ``true``, the track at ``track_idx`` wraps the interpolation loop.
  718. .. rst-class:: classref-item-separator
  719. ----
  720. .. _class_Animation_method_track_set_interpolation_type:
  721. .. rst-class:: classref-method
  722. void **track_set_interpolation_type** **(** :ref:`int<class_int>` track_idx, :ref:`InterpolationType<enum_Animation_InterpolationType>` interpolation **)**
  723. Sets the interpolation type of a given track.
  724. .. rst-class:: classref-item-separator
  725. ----
  726. .. _class_Animation_method_track_set_key_time:
  727. .. rst-class:: classref-method
  728. void **track_set_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` time **)**
  729. Sets the time of an existing key.
  730. .. rst-class:: classref-item-separator
  731. ----
  732. .. _class_Animation_method_track_set_key_transition:
  733. .. rst-class:: classref-method
  734. void **track_set_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)**
  735. Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_Animation_method_track_set_key_value:
  739. .. rst-class:: classref-method
  740. void **track_set_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key, :ref:`Variant<class_Variant>` value **)**
  741. Sets the value of an existing key.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_Animation_method_track_set_path:
  745. .. rst-class:: classref-method
  746. void **track_set_path** **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)**
  747. 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 ``":"``.
  748. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``.
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _class_Animation_method_track_swap:
  752. .. rst-class:: classref-method
  753. void **track_swap** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)**
  754. Swaps the track ``track_idx``'s index position with the track ``with_idx``.
  755. .. rst-class:: classref-item-separator
  756. ----
  757. .. _class_Animation_method_value_track_get_update_mode:
  758. .. rst-class:: classref-method
  759. :ref:`UpdateMode<enum_Animation_UpdateMode>` **value_track_get_update_mode** **(** :ref:`int<class_int>` track_idx **)** |const|
  760. Returns the update mode of a value track.
  761. .. rst-class:: classref-item-separator
  762. ----
  763. .. _class_Animation_method_value_track_interpolate:
  764. .. rst-class:: classref-method
  765. :ref:`Variant<class_Variant>` **value_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  766. Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _class_Animation_method_value_track_set_update_mode:
  770. .. rst-class:: classref-method
  771. void **value_track_set_update_mode** **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)**
  772. Sets the update mode (see :ref:`UpdateMode<enum_Animation_UpdateMode>`) of a value track.
  773. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  774. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  775. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  776. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  777. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  778. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  779. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`