class_animation.rst 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Animation.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Animation:
  5. Animation
  6. =========
  7. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Contains data used to animate everything in the engine.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`add_track<class_Animation_add_track>` **(** :ref:`int<class_int>` type, :ref:`int<class_int>` at_position=-1 **)** |
  16. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`clear<class_Animation_clear>` **(** **)** |
  18. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`copy_track<class_Animation_copy_track>` **(** :ref:`int<class_int>` track, :ref:`Animation<class_animation>` to_animation **)** |
  20. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`find_track<class_Animation_find_track>` **(** :ref:`NodePath<class_nodepath>` path **)** const |
  22. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_length<class_Animation_get_length>` **(** **)** const |
  24. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`get_step<class_Animation_get_step>` **(** **)** const |
  26. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_get_track_count>` **(** **)** const |
  28. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`has_loop<class_Animation_has_loop>` **(** **)** const |
  30. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`PoolIntArray<class_poolintarray>` | :ref:`method_track_get_key_indices<class_Animation_method_track_get_key_indices>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
  32. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`String<class_string>` | :ref:`method_track_get_name<class_Animation_method_track_get_name>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
  34. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Array<class_array>` | :ref:`method_track_get_params<class_Animation_method_track_get_params>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
  36. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`remove_track<class_Animation_remove_track>` **(** :ref:`int<class_int>` idx **)** |
  38. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`set_length<class_Animation_set_length>` **(** :ref:`float<class_float>` time_sec **)** |
  40. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_loop<class_Animation_set_loop>` **(** :ref:`bool<class_bool>` enabled **)** |
  42. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_step<class_Animation_set_step>` **(** :ref:`float<class_float>` size_sec **)** |
  44. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_track_find_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const |
  46. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`track_get_interpolation_loop_wrap<class_Animation_track_get_interpolation_loop_wrap>` **(** :ref:`int<class_int>` idx **)** const |
  48. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`track_get_interpolation_type<class_Animation_track_get_interpolation_type>` **(** :ref:`int<class_int>` idx **)** const |
  50. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_track_get_key_count>` **(** :ref:`int<class_int>` idx **)** const |
  52. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_track_get_key_time>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
  54. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_track_get_key_transition>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
  56. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Variant<class_variant>` | :ref:`track_get_key_value<class_Animation_track_get_key_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const |
  58. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`NodePath<class_nodepath>` | :ref:`track_get_path<class_Animation_track_get_path>` **(** :ref:`int<class_int>` idx **)** const |
  60. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`int<class_int>` | :ref:`track_get_type<class_Animation_track_get_type>` **(** :ref:`int<class_int>` idx **)** const |
  62. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`track_insert_key<class_Animation_track_insert_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Variant<class_variant>` key, :ref:`float<class_float>` transition=1 **)** |
  64. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_track_is_enabled>` **(** :ref:`int<class_int>` idx **)** const |
  66. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_track_is_imported>` **(** :ref:`int<class_int>` idx **)** const |
  68. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`track_move_down<class_Animation_track_move_down>` **(** :ref:`int<class_int>` idx **)** |
  70. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`track_move_up<class_Animation_track_move_up>` **(** :ref:`int<class_int>` idx **)** |
  72. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`track_remove_key<class_Animation_track_remove_key>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** |
  74. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`track_remove_key_at_position<class_Animation_track_remove_key_at_position>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` position **)** |
  76. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`track_set_enabled<class_Animation_track_set_enabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enabled **)** |
  78. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`track_set_imported<class_Animation_track_set_imported>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` imported **)** |
  80. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`track_set_interpolation_loop_wrap<class_Animation_track_set_interpolation_loop_wrap>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` interpolation **)** |
  82. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`track_set_interpolation_type<class_Animation_track_set_interpolation_type>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` interpolation **)** |
  84. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`track_set_key_transition<class_Animation_track_set_key_transition>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)** |
  86. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`track_set_key_value<class_Animation_track_set_key_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key, :ref:`Variant<class_variant>` value **)** |
  88. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`track_set_path<class_Animation_track_set_path>` **(** :ref:`int<class_int>` idx, :ref:`NodePath<class_nodepath>` path **)** |
  90. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`int<class_int>` | :ref:`transform_track_insert_key<class_Animation_transform_track_insert_key>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Vector3<class_vector3>` location, :ref:`Quat<class_quat>` rotation, :ref:`Vector3<class_vector3>` scale **)** |
  92. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`Array<class_array>` | :ref:`transform_track_interpolate<class_Animation_transform_track_interpolate>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec **)** const |
  94. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`PoolIntArray<class_poolintarray>` | :ref:`value_track_get_key_indices<class_Animation_value_track_get_key_indices>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const |
  96. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`int<class_int>` | :ref:`value_track_get_update_mode<class_Animation_value_track_get_update_mode>` **(** :ref:`int<class_int>` idx **)** const |
  98. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`value_track_set_update_mode<class_Animation_value_track_set_update_mode>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` mode **)** |
  100. +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. Enums
  102. -----
  103. .. _enum_Animation_UpdateMode:
  104. enum **UpdateMode**
  105. - **UPDATE_CONTINUOUS** = **0** --- Update between keyframes.
  106. - **UPDATE_DISCRETE** = **1** --- Update at the keyframes and hold the value.
  107. - **UPDATE_TRIGGER** = **2** --- Update at the keyframes.
  108. .. _enum_Animation_InterpolationType:
  109. enum **InterpolationType**
  110. - **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value).
  111. - **INTERPOLATION_LINEAR** = **1** --- Linear interpolation.
  112. - **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation.
  113. .. _enum_Animation_TrackType:
  114. enum **TrackType**
  115. - **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated.
  116. - **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
  117. - **TYPE_METHOD** = **2** --- Method tracks call functions with given arguments per key.
  118. Description
  119. -----------
  120. 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.
  121. Animations are just data containers, and must be added to odes such as an :ref:`AnimationPlayer<class_animationplayer>` or :ref:`AnimationTreePlayer<class_animationtreeplayer>` to be played back.
  122. Member Function Description
  123. ---------------------------
  124. .. _class_Animation_add_track:
  125. - :ref:`int<class_int>` **add_track** **(** :ref:`int<class_int>` type, :ref:`int<class_int>` at_position=-1 **)**
  126. Add a track to the Animation. The track type must be specified as any of the values in the TYPE\_\* enumeration.
  127. .. _class_Animation_clear:
  128. - void **clear** **(** **)**
  129. Clear the animation (clear all tracks and reset all).
  130. .. _class_Animation_copy_track:
  131. - void **copy_track** **(** :ref:`int<class_int>` track, :ref:`Animation<class_animation>` to_animation **)**
  132. Adds a new track that is a copy of the given track from ``to_animation``.
  133. .. _class_Animation_find_track:
  134. - :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_nodepath>` path **)** const
  135. Return the index of the specified track. If the track is not found, return -1.
  136. .. _class_Animation_get_length:
  137. - :ref:`float<class_float>` **get_length** **(** **)** const
  138. Return the total length of the animation (in seconds).
  139. .. _class_Animation_get_step:
  140. - :ref:`float<class_float>` **get_step** **(** **)** const
  141. Get the animation step value.
  142. .. _class_Animation_get_track_count:
  143. - :ref:`int<class_int>` **get_track_count** **(** **)** const
  144. Return the amount of tracks in the animation.
  145. .. _class_Animation_has_loop:
  146. - :ref:`bool<class_bool>` **has_loop** **(** **)** const
  147. Return whether the animation has the loop flag set.
  148. .. _class_Animation_method_track_get_key_indices:
  149. - :ref:`PoolIntArray<class_poolintarray>` **method_track_get_key_indices** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
  150. Return all the key indices of a method track, given a position and delta time.
  151. .. _class_Animation_method_track_get_name:
  152. - :ref:`String<class_string>` **method_track_get_name** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
  153. Return the method name of a method track.
  154. .. _class_Animation_method_track_get_params:
  155. - :ref:`Array<class_array>` **method_track_get_params** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
  156. Return the arguments values to be called on a method track for a given key in a given track.
  157. .. _class_Animation_remove_track:
  158. - void **remove_track** **(** :ref:`int<class_int>` idx **)**
  159. Remove a track by specifying the track index.
  160. .. _class_Animation_set_length:
  161. - void **set_length** **(** :ref:`float<class_float>` time_sec **)**
  162. Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
  163. .. _class_Animation_set_loop:
  164. - void **set_loop** **(** :ref:`bool<class_bool>` enabled **)**
  165. Set 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.
  166. .. _class_Animation_set_step:
  167. - void **set_step** **(** :ref:`float<class_float>` size_sec **)**
  168. Set the animation step value.
  169. .. _class_Animation_track_find_key:
  170. - :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`bool<class_bool>` exact=false **)** const
  171. Find the key index by time in a given track. Optionally, only find it if the exact time is given.
  172. .. _class_Animation_track_get_interpolation_loop_wrap:
  173. - :ref:`bool<class_bool>` **track_get_interpolation_loop_wrap** **(** :ref:`int<class_int>` idx **)** const
  174. Returns ``true`` if the track at ``idx`` wraps the interpolation loop. Default value: ``true``.
  175. .. _class_Animation_track_get_interpolation_type:
  176. - :ref:`int<class_int>` **track_get_interpolation_type** **(** :ref:`int<class_int>` idx **)** const
  177. Return the interpolation type of a given track, from the INTERPOLATION\_\* enum.
  178. .. _class_Animation_track_get_key_count:
  179. - :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` idx **)** const
  180. Return the amount of keys in a given track.
  181. .. _class_Animation_track_get_key_time:
  182. - :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
  183. Return the time at which the key is located.
  184. .. _class_Animation_track_get_key_transition:
  185. - :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
  186. Return the transition curve (easing) for a specific key (see built-in math function "ease").
  187. .. _class_Animation_track_get_key_value:
  188. - :ref:`Variant<class_variant>` **track_get_key_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)** const
  189. Return the value of a given key in a given track.
  190. .. _class_Animation_track_get_path:
  191. - :ref:`NodePath<class_nodepath>` **track_get_path** **(** :ref:`int<class_int>` idx **)** const
  192. Get the path of a track. for more information on the path format, see :ref:`track_set_path<class_Animation_track_set_path>`
  193. .. _class_Animation_track_get_type:
  194. - :ref:`int<class_int>` **track_get_type** **(** :ref:`int<class_int>` idx **)** const
  195. Get the type of a track.
  196. .. _class_Animation_track_insert_key:
  197. - void **track_insert_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Variant<class_variant>` key, :ref:`float<class_float>` transition=1 **)**
  198. Insert a generic key in a given track.
  199. .. _class_Animation_track_is_enabled:
  200. - :ref:`bool<class_bool>` **track_is_enabled** **(** :ref:`int<class_int>` idx **)** const
  201. Returns ``true`` if the track at index ``idx`` is enabled.
  202. .. _class_Animation_track_is_imported:
  203. - :ref:`bool<class_bool>` **track_is_imported** **(** :ref:`int<class_int>` idx **)** const
  204. Return true if the given track is imported. Else, return false.
  205. .. _class_Animation_track_move_down:
  206. - void **track_move_down** **(** :ref:`int<class_int>` idx **)**
  207. Move a track down.
  208. .. _class_Animation_track_move_up:
  209. - void **track_move_up** **(** :ref:`int<class_int>` idx **)**
  210. Move a track up.
  211. .. _class_Animation_track_remove_key:
  212. - void **track_remove_key** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx **)**
  213. Remove a key by index in a given track.
  214. .. _class_Animation_track_remove_key_at_position:
  215. - void **track_remove_key_at_position** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` position **)**
  216. Remove a key by position (seconds) in a given track.
  217. .. _class_Animation_track_set_enabled:
  218. - void **track_set_enabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enabled **)**
  219. Enables/disables the given track. Tracks are enabled by default.
  220. .. _class_Animation_track_set_imported:
  221. - void **track_set_imported** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` imported **)**
  222. Set the given track as imported or not.
  223. .. _class_Animation_track_set_interpolation_loop_wrap:
  224. - void **track_set_interpolation_loop_wrap** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` interpolation **)**
  225. If ``true`` the track at ``idx`` wraps the interpolation loop.
  226. .. _class_Animation_track_set_interpolation_type:
  227. - void **track_set_interpolation_type** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` interpolation **)**
  228. Set the interpolation type of a given track, from the INTERPOLATION\_\* enum.
  229. .. _class_Animation_track_set_key_transition:
  230. - void **track_set_key_transition** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)**
  231. Set the transition curve (easing) for a specific key (see built-in math function "ease").
  232. .. _class_Animation_track_set_key_value:
  233. - void **track_set_key_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` key, :ref:`Variant<class_variant>` value **)**
  234. Set the value of an existing key.
  235. .. _class_Animation_track_set_path:
  236. - void **track_set_path** **(** :ref:`int<class_int>` idx, :ref:`NodePath<class_nodepath>` path **)**
  237. Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local"
  238. .. _class_Animation_transform_track_insert_key:
  239. - :ref:`int<class_int>` **transform_track_insert_key** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time, :ref:`Vector3<class_vector3>` location, :ref:`Quat<class_quat>` rotation, :ref:`Vector3<class_vector3>` scale **)**
  240. Insert a transform key for a transform track.
  241. .. _class_Animation_transform_track_interpolate:
  242. - :ref:`Array<class_array>` **transform_track_interpolate** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec **)** const
  243. Return 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>`).
  244. .. _class_Animation_value_track_get_key_indices:
  245. - :ref:`PoolIntArray<class_poolintarray>` **value_track_get_key_indices** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` time_sec, :ref:`float<class_float>` delta **)** const
  246. Return all the key indices of a value track, given a position and delta time.
  247. .. _class_Animation_value_track_get_update_mode:
  248. - :ref:`int<class_int>` **value_track_get_update_mode** **(** :ref:`int<class_int>` idx **)** const
  249. Return the update mode of a value track.
  250. .. _class_Animation_value_track_set_update_mode:
  251. - void **value_track_set_update_mode** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` mode **)**
  252. Set the update mode (UPDATE\_\*) of a value track.