class_animationtreeplayer.rst 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/AnimationTreePlayer.xml.
  6. .. _class_AnimationTreePlayer:
  7. AnimationTreePlayer
  8. ===================
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. *Deprecated.* Animation player that uses a node graph for blending animations. Superseded by :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. *Deprecated.* A node graph tool for blending multiple animations bound to an :ref:`AnimationPlayer<class_AnimationPlayer>`. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose.
  15. It takes :ref:`Animation<class_Animation>`\ s from an :ref:`AnimationPlayer<class_AnimationPlayer>` node and mixes them depending on the graph.
  16. See :ref:`AnimationTree<class_AnimationTree>` for a more full-featured replacement of this node.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`../tutorials/animation/animation_tree`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------+
  27. | :ref:`bool<class_bool>` | :ref:`active<class_AnimationTreePlayer_property_active>` | ``false`` |
  28. +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------+
  29. | :ref:`NodePath<class_NodePath>` | :ref:`base_path<class_AnimationTreePlayer_property_base_path>` | ``NodePath("..")`` |
  30. +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------+
  31. | :ref:`NodePath<class_NodePath>` | :ref:`master_player<class_AnimationTreePlayer_property_master_player>` | ``NodePath("")`` |
  32. +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------+
  33. | :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` | :ref:`playback_process_mode<class_AnimationTreePlayer_property_playback_process_mode>` | ``1`` |
  34. +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------+
  35. .. rst-class:: classref-reftable-group
  36. Methods
  37. -------
  38. .. table::
  39. :widths: auto
  40. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`add_node<class_AnimationTreePlayer_method_add_node>` **(** :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` type, :ref:`String<class_String>` id **)** |
  42. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`advance<class_AnimationTreePlayer_method_advance>` **(** :ref:`float<class_float>` delta **)** |
  44. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`Animation<class_Animation>` | :ref:`animation_node_get_animation<class_AnimationTreePlayer_method_animation_node_get_animation>` **(** :ref:`String<class_String>` id **)** |const| |
  46. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`String<class_String>` | :ref:`animation_node_get_master_animation<class_AnimationTreePlayer_method_animation_node_get_master_animation>` **(** :ref:`String<class_String>` id **)** |const| |
  48. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`float<class_float>` | :ref:`animation_node_get_position<class_AnimationTreePlayer_method_animation_node_get_position>` **(** :ref:`String<class_String>` id **)** |const| |
  50. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`animation_node_set_animation<class_AnimationTreePlayer_method_animation_node_set_animation>` **(** :ref:`String<class_String>` id, :ref:`Animation<class_Animation>` animation **)** |
  52. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`animation_node_set_filter_path<class_AnimationTreePlayer_method_animation_node_set_filter_path>` **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)** |
  54. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`animation_node_set_master_animation<class_AnimationTreePlayer_method_animation_node_set_master_animation>` **(** :ref:`String<class_String>` id, :ref:`String<class_String>` source **)** |
  56. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`are_nodes_connected<class_AnimationTreePlayer_method_are_nodes_connected>` **(** :ref:`String<class_String>` id, :ref:`String<class_String>` dst_id, :ref:`int<class_int>` dst_input_idx **)** |const| |
  58. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`float<class_float>` | :ref:`blend2_node_get_amount<class_AnimationTreePlayer_method_blend2_node_get_amount>` **(** :ref:`String<class_String>` id **)** |const| |
  60. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`blend2_node_set_amount<class_AnimationTreePlayer_method_blend2_node_set_amount>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` blend **)** |
  62. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`blend2_node_set_filter_path<class_AnimationTreePlayer_method_blend2_node_set_filter_path>` **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)** |
  64. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`float<class_float>` | :ref:`blend3_node_get_amount<class_AnimationTreePlayer_method_blend3_node_get_amount>` **(** :ref:`String<class_String>` id **)** |const| |
  66. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`blend3_node_set_amount<class_AnimationTreePlayer_method_blend3_node_set_amount>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` blend **)** |
  68. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Vector2<class_Vector2>` | :ref:`blend4_node_get_amount<class_AnimationTreePlayer_method_blend4_node_get_amount>` **(** :ref:`String<class_String>` id **)** |const| |
  70. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`blend4_node_set_amount<class_AnimationTreePlayer_method_blend4_node_set_amount>` **(** :ref:`String<class_String>` id, :ref:`Vector2<class_Vector2>` blend **)** |
  72. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_nodes<class_AnimationTreePlayer_method_connect_nodes>` **(** :ref:`String<class_String>` id, :ref:`String<class_String>` dst_id, :ref:`int<class_int>` dst_input_idx **)** |
  74. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`disconnect_nodes<class_AnimationTreePlayer_method_disconnect_nodes>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` dst_input_idx **)** |
  76. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_node_list<class_AnimationTreePlayer_method_get_node_list>` **(** **)** |
  78. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`float<class_float>` | :ref:`mix_node_get_amount<class_AnimationTreePlayer_method_mix_node_get_amount>` **(** :ref:`String<class_String>` id **)** |const| |
  80. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`mix_node_set_amount<class_AnimationTreePlayer_method_mix_node_set_amount>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` ratio **)** |
  82. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`bool<class_bool>` | :ref:`node_exists<class_AnimationTreePlayer_method_node_exists>` **(** :ref:`String<class_String>` node **)** |const| |
  84. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`int<class_int>` | :ref:`node_get_input_count<class_AnimationTreePlayer_method_node_get_input_count>` **(** :ref:`String<class_String>` id **)** |const| |
  86. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`String<class_String>` | :ref:`node_get_input_source<class_AnimationTreePlayer_method_node_get_input_source>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` idx **)** |const| |
  88. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`Vector2<class_Vector2>` | :ref:`node_get_position<class_AnimationTreePlayer_method_node_get_position>` **(** :ref:`String<class_String>` id **)** |const| |
  90. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` | :ref:`node_get_type<class_AnimationTreePlayer_method_node_get_type>` **(** :ref:`String<class_String>` id **)** |const| |
  92. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`node_rename<class_AnimationTreePlayer_method_node_rename>` **(** :ref:`String<class_String>` node, :ref:`String<class_String>` new_name **)** |
  94. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`node_set_position<class_AnimationTreePlayer_method_node_set_position>` **(** :ref:`String<class_String>` id, :ref:`Vector2<class_Vector2>` screen_position **)** |
  96. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_delay<class_AnimationTreePlayer_method_oneshot_node_get_autorestart_delay>` **(** :ref:`String<class_String>` id **)** |const| |
  98. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_random_delay<class_AnimationTreePlayer_method_oneshot_node_get_autorestart_random_delay>` **(** :ref:`String<class_String>` id **)** |const| |
  100. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadein_time<class_AnimationTreePlayer_method_oneshot_node_get_fadein_time>` **(** :ref:`String<class_String>` id **)** |const| |
  102. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadeout_time<class_AnimationTreePlayer_method_oneshot_node_get_fadeout_time>` **(** :ref:`String<class_String>` id **)** |const| |
  104. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`bool<class_bool>` | :ref:`oneshot_node_has_autorestart<class_AnimationTreePlayer_method_oneshot_node_has_autorestart>` **(** :ref:`String<class_String>` id **)** |const| |
  106. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`bool<class_bool>` | :ref:`oneshot_node_is_active<class_AnimationTreePlayer_method_oneshot_node_is_active>` **(** :ref:`String<class_String>` id **)** |const| |
  108. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`oneshot_node_set_autorestart<class_AnimationTreePlayer_method_oneshot_node_set_autorestart>` **(** :ref:`String<class_String>` id, :ref:`bool<class_bool>` enable **)** |
  110. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`oneshot_node_set_autorestart_delay<class_AnimationTreePlayer_method_oneshot_node_set_autorestart_delay>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` delay_sec **)** |
  112. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`oneshot_node_set_autorestart_random_delay<class_AnimationTreePlayer_method_oneshot_node_set_autorestart_random_delay>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` rand_sec **)** |
  114. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`oneshot_node_set_fadein_time<class_AnimationTreePlayer_method_oneshot_node_set_fadein_time>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)** |
  116. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`oneshot_node_set_fadeout_time<class_AnimationTreePlayer_method_oneshot_node_set_fadeout_time>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)** |
  118. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`oneshot_node_set_filter_path<class_AnimationTreePlayer_method_oneshot_node_set_filter_path>` **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)** |
  120. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`oneshot_node_start<class_AnimationTreePlayer_method_oneshot_node_start>` **(** :ref:`String<class_String>` id **)** |
  122. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`oneshot_node_stop<class_AnimationTreePlayer_method_oneshot_node_stop>` **(** :ref:`String<class_String>` id **)** |
  124. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`recompute_caches<class_AnimationTreePlayer_method_recompute_caches>` **(** **)** |
  126. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | void | :ref:`remove_node<class_AnimationTreePlayer_method_remove_node>` **(** :ref:`String<class_String>` id **)** |
  128. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | void | :ref:`reset<class_AnimationTreePlayer_method_reset>` **(** **)** |
  130. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`float<class_float>` | :ref:`timescale_node_get_scale<class_AnimationTreePlayer_method_timescale_node_get_scale>` **(** :ref:`String<class_String>` id **)** |const| |
  132. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | void | :ref:`timescale_node_set_scale<class_AnimationTreePlayer_method_timescale_node_set_scale>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` scale **)** |
  134. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`timeseek_node_seek<class_AnimationTreePlayer_method_timeseek_node_seek>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` seconds **)** |
  136. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | void | :ref:`transition_node_delete_input<class_AnimationTreePlayer_method_transition_node_delete_input>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)** |
  138. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`int<class_int>` | :ref:`transition_node_get_current<class_AnimationTreePlayer_method_transition_node_get_current>` **(** :ref:`String<class_String>` id **)** |const| |
  140. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`int<class_int>` | :ref:`transition_node_get_input_count<class_AnimationTreePlayer_method_transition_node_get_input_count>` **(** :ref:`String<class_String>` id **)** |const| |
  142. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`float<class_float>` | :ref:`transition_node_get_xfade_time<class_AnimationTreePlayer_method_transition_node_get_xfade_time>` **(** :ref:`String<class_String>` id **)** |const| |
  144. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`bool<class_bool>` | :ref:`transition_node_has_input_auto_advance<class_AnimationTreePlayer_method_transition_node_has_input_auto_advance>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)** |const| |
  146. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | void | :ref:`transition_node_set_current<class_AnimationTreePlayer_method_transition_node_set_current>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)** |
  148. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`transition_node_set_input_auto_advance<class_AnimationTreePlayer_method_transition_node_set_input_auto_advance>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)** |
  150. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | void | :ref:`transition_node_set_input_count<class_AnimationTreePlayer_method_transition_node_set_input_count>` **(** :ref:`String<class_String>` id, :ref:`int<class_int>` count **)** |
  152. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | void | :ref:`transition_node_set_xfade_time<class_AnimationTreePlayer_method_transition_node_set_xfade_time>` **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)** |
  154. +----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. .. rst-class:: classref-section-separator
  156. ----
  157. .. rst-class:: classref-descriptions-group
  158. Enumerations
  159. ------------
  160. .. _enum_AnimationTreePlayer_NodeType:
  161. .. rst-class:: classref-enumeration
  162. enum **NodeType**:
  163. .. _class_AnimationTreePlayer_constant_NODE_OUTPUT:
  164. .. rst-class:: classref-enumeration-constant
  165. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_OUTPUT** = ``0``
  166. Output node.
  167. .. _class_AnimationTreePlayer_constant_NODE_ANIMATION:
  168. .. rst-class:: classref-enumeration-constant
  169. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_ANIMATION** = ``1``
  170. Animation node.
  171. .. _class_AnimationTreePlayer_constant_NODE_ONESHOT:
  172. .. rst-class:: classref-enumeration-constant
  173. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_ONESHOT** = ``2``
  174. OneShot node.
  175. .. _class_AnimationTreePlayer_constant_NODE_MIX:
  176. .. rst-class:: classref-enumeration-constant
  177. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_MIX** = ``3``
  178. Mix node.
  179. .. _class_AnimationTreePlayer_constant_NODE_BLEND2:
  180. .. rst-class:: classref-enumeration-constant
  181. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_BLEND2** = ``4``
  182. Blend2 node.
  183. .. _class_AnimationTreePlayer_constant_NODE_BLEND3:
  184. .. rst-class:: classref-enumeration-constant
  185. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_BLEND3** = ``5``
  186. Blend3 node.
  187. .. _class_AnimationTreePlayer_constant_NODE_BLEND4:
  188. .. rst-class:: classref-enumeration-constant
  189. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_BLEND4** = ``6``
  190. Blend4 node.
  191. .. _class_AnimationTreePlayer_constant_NODE_TIMESCALE:
  192. .. rst-class:: classref-enumeration-constant
  193. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_TIMESCALE** = ``7``
  194. TimeScale node.
  195. .. _class_AnimationTreePlayer_constant_NODE_TIMESEEK:
  196. .. rst-class:: classref-enumeration-constant
  197. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_TIMESEEK** = ``8``
  198. TimeSeek node.
  199. .. _class_AnimationTreePlayer_constant_NODE_TRANSITION:
  200. .. rst-class:: classref-enumeration-constant
  201. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **NODE_TRANSITION** = ``9``
  202. Transition node.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _enum_AnimationTreePlayer_AnimationProcessMode:
  206. .. rst-class:: classref-enumeration
  207. enum **AnimationProcessMode**:
  208. .. _class_AnimationTreePlayer_constant_ANIMATION_PROCESS_PHYSICS:
  209. .. rst-class:: classref-enumeration-constant
  210. :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` **ANIMATION_PROCESS_PHYSICS** = ``0``
  211. Process animation during the physics process. This is especially useful when animating physics bodies.
  212. .. _class_AnimationTreePlayer_constant_ANIMATION_PROCESS_IDLE:
  213. .. rst-class:: classref-enumeration-constant
  214. :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` **ANIMATION_PROCESS_IDLE** = ``1``
  215. Process animation during the idle process.
  216. .. rst-class:: classref-section-separator
  217. ----
  218. .. rst-class:: classref-descriptions-group
  219. Property Descriptions
  220. ---------------------
  221. .. _class_AnimationTreePlayer_property_active:
  222. .. rst-class:: classref-property
  223. :ref:`bool<class_bool>` **active** = ``false``
  224. .. rst-class:: classref-property-setget
  225. - void **set_active** **(** :ref:`bool<class_bool>` value **)**
  226. - :ref:`bool<class_bool>` **is_active** **(** **)**
  227. If ``true``, the **AnimationTreePlayer** is able to play animations.
  228. .. rst-class:: classref-item-separator
  229. ----
  230. .. _class_AnimationTreePlayer_property_base_path:
  231. .. rst-class:: classref-property
  232. :ref:`NodePath<class_NodePath>` **base_path** = ``NodePath("..")``
  233. .. rst-class:: classref-property-setget
  234. - void **set_base_path** **(** :ref:`NodePath<class_NodePath>` value **)**
  235. - :ref:`NodePath<class_NodePath>` **get_base_path** **(** **)**
  236. The node from which to relatively access other nodes.
  237. It accesses the bones, so it should point to the same node the :ref:`AnimationPlayer<class_AnimationPlayer>` would point its Root Node at.
  238. .. rst-class:: classref-item-separator
  239. ----
  240. .. _class_AnimationTreePlayer_property_master_player:
  241. .. rst-class:: classref-property
  242. :ref:`NodePath<class_NodePath>` **master_player** = ``NodePath("")``
  243. .. rst-class:: classref-property-setget
  244. - void **set_master_player** **(** :ref:`NodePath<class_NodePath>` value **)**
  245. - :ref:`NodePath<class_NodePath>` **get_master_player** **(** **)**
  246. The path to the :ref:`AnimationPlayer<class_AnimationPlayer>` from which this **AnimationTreePlayer** binds animations to animation nodes.
  247. Once set, :ref:`Animation<class_Animation>` nodes can be added to the **AnimationTreePlayer**.
  248. .. rst-class:: classref-item-separator
  249. ----
  250. .. _class_AnimationTreePlayer_property_playback_process_mode:
  251. .. rst-class:: classref-property
  252. :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` **playback_process_mode** = ``1``
  253. .. rst-class:: classref-property-setget
  254. - void **set_animation_process_mode** **(** :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` value **)**
  255. - :ref:`AnimationProcessMode<enum_AnimationTreePlayer_AnimationProcessMode>` **get_animation_process_mode** **(** **)**
  256. The thread in which to update animations.
  257. .. rst-class:: classref-section-separator
  258. ----
  259. .. rst-class:: classref-descriptions-group
  260. Method Descriptions
  261. -------------------
  262. .. _class_AnimationTreePlayer_method_add_node:
  263. .. rst-class:: classref-method
  264. void **add_node** **(** :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` type, :ref:`String<class_String>` id **)**
  265. Adds a ``type`` node to the graph with name ``id``.
  266. .. rst-class:: classref-item-separator
  267. ----
  268. .. _class_AnimationTreePlayer_method_advance:
  269. .. rst-class:: classref-method
  270. void **advance** **(** :ref:`float<class_float>` delta **)**
  271. Shifts position in the animation timeline. ``delta`` is the time in seconds to shift. Events between the current frame and ``delta`` are handled.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_AnimationTreePlayer_method_animation_node_get_animation:
  275. .. rst-class:: classref-method
  276. :ref:`Animation<class_Animation>` **animation_node_get_animation** **(** :ref:`String<class_String>` id **)** |const|
  277. Returns the :ref:`AnimationPlayer<class_AnimationPlayer>`'s :ref:`Animation<class_Animation>` bound to the **AnimationTreePlayer**'s animation node with name ``id``.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_AnimationTreePlayer_method_animation_node_get_master_animation:
  281. .. rst-class:: classref-method
  282. :ref:`String<class_String>` **animation_node_get_master_animation** **(** :ref:`String<class_String>` id **)** |const|
  283. Returns the name of the :ref:`master_player<class_AnimationTreePlayer_property_master_player>`'s :ref:`Animation<class_Animation>` bound to this animation node.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_AnimationTreePlayer_method_animation_node_get_position:
  287. .. rst-class:: classref-method
  288. :ref:`float<class_float>` **animation_node_get_position** **(** :ref:`String<class_String>` id **)** |const|
  289. Returns the absolute playback timestamp of the animation node with name ``id``.
  290. .. rst-class:: classref-item-separator
  291. ----
  292. .. _class_AnimationTreePlayer_method_animation_node_set_animation:
  293. .. rst-class:: classref-method
  294. void **animation_node_set_animation** **(** :ref:`String<class_String>` id, :ref:`Animation<class_Animation>` animation **)**
  295. Binds a new :ref:`Animation<class_Animation>` from the :ref:`master_player<class_AnimationTreePlayer_property_master_player>` to the **AnimationTreePlayer**'s animation node with name ``id``.
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _class_AnimationTreePlayer_method_animation_node_set_filter_path:
  299. .. rst-class:: classref-method
  300. void **animation_node_set_filter_path** **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)**
  301. If ``enable`` is ``true``, the animation node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
  302. .. rst-class:: classref-item-separator
  303. ----
  304. .. _class_AnimationTreePlayer_method_animation_node_set_master_animation:
  305. .. rst-class:: classref-method
  306. void **animation_node_set_master_animation** **(** :ref:`String<class_String>` id, :ref:`String<class_String>` source **)**
  307. Binds the :ref:`Animation<class_Animation>` named ``source`` from :ref:`master_player<class_AnimationTreePlayer_property_master_player>` to the animation node ``id``. Recalculates caches.
  308. .. rst-class:: classref-item-separator
  309. ----
  310. .. _class_AnimationTreePlayer_method_are_nodes_connected:
  311. .. rst-class:: classref-method
  312. :ref:`bool<class_bool>` **are_nodes_connected** **(** :ref:`String<class_String>` id, :ref:`String<class_String>` dst_id, :ref:`int<class_int>` dst_input_idx **)** |const|
  313. Returns whether node ``id`` and ``dst_id`` are connected at the specified slot.
  314. .. rst-class:: classref-item-separator
  315. ----
  316. .. _class_AnimationTreePlayer_method_blend2_node_get_amount:
  317. .. rst-class:: classref-method
  318. :ref:`float<class_float>` **blend2_node_get_amount** **(** :ref:`String<class_String>` id **)** |const|
  319. Returns the blend amount of a Blend2 node given its name.
  320. .. rst-class:: classref-item-separator
  321. ----
  322. .. _class_AnimationTreePlayer_method_blend2_node_set_amount:
  323. .. rst-class:: classref-method
  324. void **blend2_node_set_amount** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` blend **)**
  325. Sets the blend amount of a Blend2 node given its name and value.
  326. A Blend2 node blends two animations (A and B) with the amount between 0 and 1.
  327. At 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B.
  328. .. rst-class:: classref-item-separator
  329. ----
  330. .. _class_AnimationTreePlayer_method_blend2_node_set_filter_path:
  331. .. rst-class:: classref-method
  332. void **blend2_node_set_filter_path** **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)**
  333. If ``enable`` is ``true``, the Blend2 node with name ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_AnimationTreePlayer_method_blend3_node_get_amount:
  337. .. rst-class:: classref-method
  338. :ref:`float<class_float>` **blend3_node_get_amount** **(** :ref:`String<class_String>` id **)** |const|
  339. Returns the blend amount of a Blend3 node given its name.
  340. .. rst-class:: classref-item-separator
  341. ----
  342. .. _class_AnimationTreePlayer_method_blend3_node_set_amount:
  343. .. rst-class:: classref-method
  344. void **blend3_node_set_amount** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` blend **)**
  345. Sets the blend amount of a Blend3 node given its name and value.
  346. A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1.
  347. At -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+.
  348. .. rst-class:: classref-item-separator
  349. ----
  350. .. _class_AnimationTreePlayer_method_blend4_node_get_amount:
  351. .. rst-class:: classref-method
  352. :ref:`Vector2<class_Vector2>` **blend4_node_get_amount** **(** :ref:`String<class_String>` id **)** |const|
  353. Returns the blend amount of a Blend4 node given its name.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_AnimationTreePlayer_method_blend4_node_set_amount:
  357. .. rst-class:: classref-method
  358. void **blend4_node_set_amount** **(** :ref:`String<class_String>` id, :ref:`Vector2<class_Vector2>` blend **)**
  359. Sets the blend amount of a Blend4 node given its name and value.
  360. A Blend4 Node blends two pairs of animations.
  361. The two pairs are blended like Blend2 and then added together.
  362. .. rst-class:: classref-item-separator
  363. ----
  364. .. _class_AnimationTreePlayer_method_connect_nodes:
  365. .. rst-class:: classref-method
  366. :ref:`Error<enum_@GlobalScope_Error>` **connect_nodes** **(** :ref:`String<class_String>` id, :ref:`String<class_String>` dst_id, :ref:`int<class_int>` dst_input_idx **)**
  367. Connects node ``id`` to ``dst_id`` at the specified input slot.
  368. .. rst-class:: classref-item-separator
  369. ----
  370. .. _class_AnimationTreePlayer_method_disconnect_nodes:
  371. .. rst-class:: classref-method
  372. void **disconnect_nodes** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` dst_input_idx **)**
  373. Disconnects nodes connected to ``id`` at the specified input slot.
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_AnimationTreePlayer_method_get_node_list:
  377. .. rst-class:: classref-method
  378. :ref:`PoolStringArray<class_PoolStringArray>` **get_node_list** **(** **)**
  379. Returns a :ref:`PoolStringArray<class_PoolStringArray>` containing the name of all nodes.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _class_AnimationTreePlayer_method_mix_node_get_amount:
  383. .. rst-class:: classref-method
  384. :ref:`float<class_float>` **mix_node_get_amount** **(** :ref:`String<class_String>` id **)** |const|
  385. Returns the mix amount of a Mix node given its name.
  386. .. rst-class:: classref-item-separator
  387. ----
  388. .. _class_AnimationTreePlayer_method_mix_node_set_amount:
  389. .. rst-class:: classref-method
  390. void **mix_node_set_amount** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` ratio **)**
  391. Sets the mix amount of a Mix node given its name and value.
  392. A Mix node adds input b to input a by the amount given by ratio.
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _class_AnimationTreePlayer_method_node_exists:
  396. .. rst-class:: classref-method
  397. :ref:`bool<class_bool>` **node_exists** **(** :ref:`String<class_String>` node **)** |const|
  398. Check if a node exists (by name).
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_AnimationTreePlayer_method_node_get_input_count:
  402. .. rst-class:: classref-method
  403. :ref:`int<class_int>` **node_get_input_count** **(** :ref:`String<class_String>` id **)** |const|
  404. Returns the input count for a given node. Different types of nodes have different amount of inputs.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_AnimationTreePlayer_method_node_get_input_source:
  408. .. rst-class:: classref-method
  409. :ref:`String<class_String>` **node_get_input_source** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` idx **)** |const|
  410. Returns the input source for a given node input.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_AnimationTreePlayer_method_node_get_position:
  414. .. rst-class:: classref-method
  415. :ref:`Vector2<class_Vector2>` **node_get_position** **(** :ref:`String<class_String>` id **)** |const|
  416. Returns position of a node in the graph given its name.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_AnimationTreePlayer_method_node_get_type:
  420. .. rst-class:: classref-method
  421. :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` **node_get_type** **(** :ref:`String<class_String>` id **)** |const|
  422. Gets the node type, will return from :ref:`NodeType<enum_AnimationTreePlayer_NodeType>` enum.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_AnimationTreePlayer_method_node_rename:
  426. .. rst-class:: classref-method
  427. :ref:`Error<enum_@GlobalScope_Error>` **node_rename** **(** :ref:`String<class_String>` node, :ref:`String<class_String>` new_name **)**
  428. Renames a node in the graph.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_AnimationTreePlayer_method_node_set_position:
  432. .. rst-class:: classref-method
  433. void **node_set_position** **(** :ref:`String<class_String>` id, :ref:`Vector2<class_Vector2>` screen_position **)**
  434. Sets the position of a node in the graph given its name and position.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_AnimationTreePlayer_method_oneshot_node_get_autorestart_delay:
  438. .. rst-class:: classref-method
  439. :ref:`float<class_float>` **oneshot_node_get_autorestart_delay** **(** :ref:`String<class_String>` id **)** |const|
  440. Returns the autostart delay of a OneShot node given its name.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_AnimationTreePlayer_method_oneshot_node_get_autorestart_random_delay:
  444. .. rst-class:: classref-method
  445. :ref:`float<class_float>` **oneshot_node_get_autorestart_random_delay** **(** :ref:`String<class_String>` id **)** |const|
  446. Returns the autostart random delay of a OneShot node given its name.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_AnimationTreePlayer_method_oneshot_node_get_fadein_time:
  450. .. rst-class:: classref-method
  451. :ref:`float<class_float>` **oneshot_node_get_fadein_time** **(** :ref:`String<class_String>` id **)** |const|
  452. Returns the fade in time of a OneShot node given its name.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_AnimationTreePlayer_method_oneshot_node_get_fadeout_time:
  456. .. rst-class:: classref-method
  457. :ref:`float<class_float>` **oneshot_node_get_fadeout_time** **(** :ref:`String<class_String>` id **)** |const|
  458. Returns the fade out time of a OneShot node given its name.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_AnimationTreePlayer_method_oneshot_node_has_autorestart:
  462. .. rst-class:: classref-method
  463. :ref:`bool<class_bool>` **oneshot_node_has_autorestart** **(** :ref:`String<class_String>` id **)** |const|
  464. Returns whether a OneShot node will auto restart given its name.
  465. .. rst-class:: classref-item-separator
  466. ----
  467. .. _class_AnimationTreePlayer_method_oneshot_node_is_active:
  468. .. rst-class:: classref-method
  469. :ref:`bool<class_bool>` **oneshot_node_is_active** **(** :ref:`String<class_String>` id **)** |const|
  470. Returns whether a OneShot node is active given its name.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_AnimationTreePlayer_method_oneshot_node_set_autorestart:
  474. .. rst-class:: classref-method
  475. void **oneshot_node_set_autorestart** **(** :ref:`String<class_String>` id, :ref:`bool<class_bool>` enable **)**
  476. Sets the autorestart property of a OneShot node given its name and value.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_AnimationTreePlayer_method_oneshot_node_set_autorestart_delay:
  480. .. rst-class:: classref-method
  481. void **oneshot_node_set_autorestart_delay** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` delay_sec **)**
  482. Sets the autorestart delay of a OneShot node given its name and value in seconds.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_AnimationTreePlayer_method_oneshot_node_set_autorestart_random_delay:
  486. .. rst-class:: classref-method
  487. void **oneshot_node_set_autorestart_random_delay** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` rand_sec **)**
  488. Sets the autorestart random delay of a OneShot node given its name and value in seconds.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_AnimationTreePlayer_method_oneshot_node_set_fadein_time:
  492. .. rst-class:: classref-method
  493. void **oneshot_node_set_fadein_time** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)**
  494. Sets the fade in time of a OneShot node given its name and value in seconds.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_AnimationTreePlayer_method_oneshot_node_set_fadeout_time:
  498. .. rst-class:: classref-method
  499. void **oneshot_node_set_fadeout_time** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)**
  500. Sets the fade out time of a OneShot node given its name and value in seconds.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_AnimationTreePlayer_method_oneshot_node_set_filter_path:
  504. .. rst-class:: classref-method
  505. void **oneshot_node_set_filter_path** **(** :ref:`String<class_String>` id, :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enable **)**
  506. If ``enable`` is ``true``, the OneShot node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_AnimationTreePlayer_method_oneshot_node_start:
  510. .. rst-class:: classref-method
  511. void **oneshot_node_start** **(** :ref:`String<class_String>` id **)**
  512. Starts a OneShot node given its name.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_AnimationTreePlayer_method_oneshot_node_stop:
  516. .. rst-class:: classref-method
  517. void **oneshot_node_stop** **(** :ref:`String<class_String>` id **)**
  518. Stops the OneShot node with name ``id``.
  519. .. rst-class:: classref-item-separator
  520. ----
  521. .. _class_AnimationTreePlayer_method_recompute_caches:
  522. .. rst-class:: classref-method
  523. void **recompute_caches** **(** **)**
  524. Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
  525. .. rst-class:: classref-item-separator
  526. ----
  527. .. _class_AnimationTreePlayer_method_remove_node:
  528. .. rst-class:: classref-method
  529. void **remove_node** **(** :ref:`String<class_String>` id **)**
  530. Removes the animation node with name ``id``.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_AnimationTreePlayer_method_reset:
  534. .. rst-class:: classref-method
  535. void **reset** **(** **)**
  536. Resets this **AnimationTreePlayer**.
  537. .. rst-class:: classref-item-separator
  538. ----
  539. .. _class_AnimationTreePlayer_method_timescale_node_get_scale:
  540. .. rst-class:: classref-method
  541. :ref:`float<class_float>` **timescale_node_get_scale** **(** :ref:`String<class_String>` id **)** |const|
  542. Returns the time scale value of the TimeScale node with name ``id``.
  543. .. rst-class:: classref-item-separator
  544. ----
  545. .. _class_AnimationTreePlayer_method_timescale_node_set_scale:
  546. .. rst-class:: classref-method
  547. void **timescale_node_set_scale** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` scale **)**
  548. Sets the time scale of the TimeScale node with name ``id`` to ``scale``.
  549. The TimeScale node is used to speed :ref:`Animation<class_Animation>`\ s up if the scale is above 1 or slow them down if it is below 1.
  550. If applied after a blend or mix, affects all input animations to that blend or mix.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _class_AnimationTreePlayer_method_timeseek_node_seek:
  554. .. rst-class:: classref-method
  555. void **timeseek_node_seek** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` seconds **)**
  556. Sets the time seek value of the TimeSeek node with name ``id`` to ``seconds``.
  557. This functions as a seek in the :ref:`Animation<class_Animation>` or the blend or mix of :ref:`Animation<class_Animation>`\ s input in it.
  558. .. rst-class:: classref-item-separator
  559. ----
  560. .. _class_AnimationTreePlayer_method_transition_node_delete_input:
  561. .. rst-class:: classref-method
  562. void **transition_node_delete_input** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)**
  563. Deletes the input at ``input_idx`` for the transition node with name ``id``.
  564. .. rst-class:: classref-item-separator
  565. ----
  566. .. _class_AnimationTreePlayer_method_transition_node_get_current:
  567. .. rst-class:: classref-method
  568. :ref:`int<class_int>` **transition_node_get_current** **(** :ref:`String<class_String>` id **)** |const|
  569. Returns the index of the currently evaluated input for the transition node with name ``id``.
  570. .. rst-class:: classref-item-separator
  571. ----
  572. .. _class_AnimationTreePlayer_method_transition_node_get_input_count:
  573. .. rst-class:: classref-method
  574. :ref:`int<class_int>` **transition_node_get_input_count** **(** :ref:`String<class_String>` id **)** |const|
  575. Returns the number of inputs for the transition node with name ``id``. You can add inputs by right-clicking on the transition node.
  576. .. rst-class:: classref-item-separator
  577. ----
  578. .. _class_AnimationTreePlayer_method_transition_node_get_xfade_time:
  579. .. rst-class:: classref-method
  580. :ref:`float<class_float>` **transition_node_get_xfade_time** **(** :ref:`String<class_String>` id **)** |const|
  581. Returns the cross fade time for the transition node with name ``id``.
  582. .. rst-class:: classref-item-separator
  583. ----
  584. .. _class_AnimationTreePlayer_method_transition_node_has_input_auto_advance:
  585. .. rst-class:: classref-method
  586. :ref:`bool<class_bool>` **transition_node_has_input_auto_advance** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)** |const|
  587. Returns ``true`` if the input at ``input_idx`` on the transition node with name ``id`` is set to automatically advance to the next input upon completion.
  588. .. rst-class:: classref-item-separator
  589. ----
  590. .. _class_AnimationTreePlayer_method_transition_node_set_current:
  591. .. rst-class:: classref-method
  592. void **transition_node_set_current** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx **)**
  593. The transition node with name ``id`` sets its current input at ``input_idx``.
  594. .. rst-class:: classref-item-separator
  595. ----
  596. .. _class_AnimationTreePlayer_method_transition_node_set_input_auto_advance:
  597. .. rst-class:: classref-method
  598. void **transition_node_set_input_auto_advance** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)**
  599. The transition node with name ``id`` advances to its next input automatically when the input at ``input_idx`` completes.
  600. .. rst-class:: classref-item-separator
  601. ----
  602. .. _class_AnimationTreePlayer_method_transition_node_set_input_count:
  603. .. rst-class:: classref-method
  604. void **transition_node_set_input_count** **(** :ref:`String<class_String>` id, :ref:`int<class_int>` count **)**
  605. Resizes the number of inputs available for the transition node with name ``id``.
  606. .. rst-class:: classref-item-separator
  607. ----
  608. .. _class_AnimationTreePlayer_method_transition_node_set_xfade_time:
  609. .. rst-class:: classref-method
  610. void **transition_node_set_xfade_time** **(** :ref:`String<class_String>` id, :ref:`float<class_float>` time_sec **)**
  611. The transition node with name ``id`` sets its cross fade time to ``time_sec``.
  612. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  613. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  614. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  615. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`