class_animationtreeplayer.rst 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the AnimationTreePlayer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_AnimationTreePlayer:
  5. AnimationTreePlayer
  6. ===================
  7. **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Animation Player that uses a node graph for the blending.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`add_node<class_AnimationTreePlayer_add_node>` **(** :ref:`int<class_int>` type, :ref:`String<class_string>` id **)** |
  16. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`advance<class_AnimationTreePlayer_advance>` **(** :ref:`float<class_float>` delta **)** |
  18. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Animation<class_animation>` | :ref:`animation_node_get_animation<class_AnimationTreePlayer_animation_node_get_animation>` **(** :ref:`String<class_string>` id **)** const |
  20. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`String<class_string>` | :ref:`animation_node_get_master_animation<class_AnimationTreePlayer_animation_node_get_master_animation>` **(** :ref:`String<class_string>` id **)** const |
  22. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`animation_node_set_animation<class_AnimationTreePlayer_animation_node_set_animation>` **(** :ref:`String<class_string>` id, :ref:`Animation<class_animation>` animation **)** |
  24. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`animation_node_set_filter_path<class_AnimationTreePlayer_animation_node_set_filter_path>` **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)** |
  26. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`animation_node_set_master_animation<class_AnimationTreePlayer_animation_node_set_master_animation>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` source **)** |
  28. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`are_nodes_connected<class_AnimationTreePlayer_are_nodes_connected>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)** const |
  30. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`float<class_float>` | :ref:`blend2_node_get_amount<class_AnimationTreePlayer_blend2_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
  32. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`blend2_node_set_amount<class_AnimationTreePlayer_blend2_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)** |
  34. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`blend2_node_set_filter_path<class_AnimationTreePlayer_blend2_node_set_filter_path>` **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)** |
  36. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`blend3_node_get_amount<class_AnimationTreePlayer_blend3_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
  38. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`blend3_node_set_amount<class_AnimationTreePlayer_blend3_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)** |
  40. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Vector2<class_vector2>` | :ref:`blend4_node_get_amount<class_AnimationTreePlayer_blend4_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
  42. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`blend4_node_set_amount<class_AnimationTreePlayer_blend4_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` blend **)** |
  44. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`int<class_int>` | :ref:`connect_nodes<class_AnimationTreePlayer_connect_nodes>` **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)** |
  46. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`disconnect_nodes<class_AnimationTreePlayer_disconnect_nodes>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` dst_input_idx **)** |
  48. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_node_list<class_AnimationTreePlayer_get_node_list>` **(** **)** |
  50. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`float<class_float>` | :ref:`mix_node_get_amount<class_AnimationTreePlayer_mix_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
  52. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`mix_node_set_amount<class_AnimationTreePlayer_mix_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)** |
  54. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`node_exists<class_AnimationTreePlayer_node_exists>` **(** :ref:`String<class_string>` node **)** const |
  56. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`int<class_int>` | :ref:`node_get_input_count<class_AnimationTreePlayer_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
  58. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`String<class_string>` | :ref:`node_get_input_source<class_AnimationTreePlayer_node_get_input_source>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` idx **)** const |
  60. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`Vector2<class_vector2>` | :ref:`node_get_position<class_AnimationTreePlayer_node_get_position>` **(** :ref:`String<class_string>` id **)** const |
  62. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`int<class_int>` | :ref:`node_get_type<class_AnimationTreePlayer_node_get_type>` **(** :ref:`String<class_string>` id **)** const |
  64. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`node_rename<class_AnimationTreePlayer_node_rename>` **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)** |
  66. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`node_set_position<class_AnimationTreePlayer_node_set_position>` **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_position **)** |
  68. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_delay<class_AnimationTreePlayer_oneshot_node_get_autorestart_delay>` **(** :ref:`String<class_string>` id **)** const |
  70. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_random_delay<class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay>` **(** :ref:`String<class_string>` id **)** const |
  72. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadein_time<class_AnimationTreePlayer_oneshot_node_get_fadein_time>` **(** :ref:`String<class_string>` id **)** const |
  74. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadeout_time<class_AnimationTreePlayer_oneshot_node_get_fadeout_time>` **(** :ref:`String<class_string>` id **)** const |
  76. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`oneshot_node_has_autorestart<class_AnimationTreePlayer_oneshot_node_has_autorestart>` **(** :ref:`String<class_string>` id **)** const |
  78. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`oneshot_node_is_active<class_AnimationTreePlayer_oneshot_node_is_active>` **(** :ref:`String<class_string>` id **)** const |
  80. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`oneshot_node_set_autorestart<class_AnimationTreePlayer_oneshot_node_set_autorestart>` **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)** |
  82. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`oneshot_node_set_autorestart_delay<class_AnimationTreePlayer_oneshot_node_set_autorestart_delay>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` delay_sec **)** |
  84. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`oneshot_node_set_autorestart_random_delay<class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` rand_sec **)** |
  86. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`oneshot_node_set_fadein_time<class_AnimationTreePlayer_oneshot_node_set_fadein_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
  88. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`oneshot_node_set_fadeout_time<class_AnimationTreePlayer_oneshot_node_set_fadeout_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
  90. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`oneshot_node_set_filter_path<class_AnimationTreePlayer_oneshot_node_set_filter_path>` **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)** |
  92. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`oneshot_node_start<class_AnimationTreePlayer_oneshot_node_start>` **(** :ref:`String<class_string>` id **)** |
  94. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`oneshot_node_stop<class_AnimationTreePlayer_oneshot_node_stop>` **(** :ref:`String<class_string>` id **)** |
  96. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`recompute_caches<class_AnimationTreePlayer_recompute_caches>` **(** **)** |
  98. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`remove_node<class_AnimationTreePlayer_remove_node>` **(** :ref:`String<class_string>` id **)** |
  100. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`reset<class_AnimationTreePlayer_reset>` **(** **)** |
  102. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`float<class_float>` | :ref:`timescale_node_get_scale<class_AnimationTreePlayer_timescale_node_get_scale>` **(** :ref:`String<class_string>` id **)** const |
  104. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`timescale_node_set_scale<class_AnimationTreePlayer_timescale_node_set_scale>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)** |
  106. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`timeseek_node_seek<class_AnimationTreePlayer_timeseek_node_seek>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` seconds **)** |
  108. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`transition_node_delete_input<class_AnimationTreePlayer_transition_node_delete_input>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
  110. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`int<class_int>` | :ref:`transition_node_get_current<class_AnimationTreePlayer_transition_node_get_current>` **(** :ref:`String<class_string>` id **)** const |
  112. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`int<class_int>` | :ref:`transition_node_get_input_count<class_AnimationTreePlayer_transition_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
  114. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`float<class_float>` | :ref:`transition_node_get_xfade_time<class_AnimationTreePlayer_transition_node_get_xfade_time>` **(** :ref:`String<class_string>` id **)** const |
  116. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`bool<class_bool>` | :ref:`transition_node_has_input_auto_advance<class_AnimationTreePlayer_transition_node_has_input_auto_advance>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** const |
  118. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`transition_node_set_current<class_AnimationTreePlayer_transition_node_set_current>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
  120. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`transition_node_set_input_auto_advance<class_AnimationTreePlayer_transition_node_set_input_auto_advance>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)** |
  122. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`transition_node_set_input_count<class_AnimationTreePlayer_transition_node_set_input_count>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)** |
  124. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`transition_node_set_xfade_time<class_AnimationTreePlayer_transition_node_set_xfade_time>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)** |
  126. +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. Member Variables
  128. ----------------
  129. .. _class_AnimationTreePlayer_active:
  130. - :ref:`bool<class_bool>` **active** - If ``true`` the ``AnimationTreePlayer`` is able to play animations. Default value: ``false``.
  131. .. _class_AnimationTreePlayer_base_path:
  132. - :ref:`NodePath<class_nodepath>` **base_path** - The node from which to relatively access other nodes. Default value: ``".."``.
  133. .. _class_AnimationTreePlayer_master_player:
  134. - :ref:`NodePath<class_nodepath>` **master_player** - The path to the :ref:`AnimationPlayer<class_animationplayer>` from which this ``AnimationTreePlayer`` binds animations to animation nodes.
  135. .. _class_AnimationTreePlayer_playback_process_mode:
  136. - :ref:`int<class_int>` **playback_process_mode** - The thread in which to update animations. Default value: enum ANIMATION_PROCESS_IDLE.
  137. Numeric Constants
  138. -----------------
  139. - **NODE_OUTPUT** = **0** --- Output node.
  140. - **NODE_ANIMATION** = **1** --- Animation node.
  141. - **NODE_ONESHOT** = **2** --- OneShot node.
  142. - **NODE_MIX** = **3** --- Mix node.
  143. - **NODE_BLEND2** = **4** --- Blend2 node.
  144. - **NODE_BLEND3** = **5** --- Blend3 node.
  145. - **NODE_BLEND4** = **6** --- Blend4 node.
  146. - **NODE_TIMESCALE** = **7** --- TimeScale node.
  147. - **NODE_TIMESEEK** = **8** --- TimeSeek node.
  148. - **NODE_TRANSITION** = **9** --- Transition node.
  149. - **ANIMATION_PROCESS_PHYSICS** = **0** --- Process animation during the physics process. This is especially useful when animating physics bodies.
  150. - **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process.
  151. Description
  152. -----------
  153. 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.
  154. Member Function Description
  155. ---------------------------
  156. .. _class_AnimationTreePlayer_add_node:
  157. - void **add_node** **(** :ref:`int<class_int>` type, :ref:`String<class_string>` id **)**
  158. Adds a ``type`` node to the graph with name ``id``.
  159. .. _class_AnimationTreePlayer_advance:
  160. - void **advance** **(** :ref:`float<class_float>` delta **)**
  161. Shifts position in the animation timeline. Delta is the time in seconds to shift.
  162. .. _class_AnimationTreePlayer_animation_node_get_animation:
  163. - :ref:`Animation<class_animation>` **animation_node_get_animation** **(** :ref:`String<class_string>` id **)** const
  164. Returns the :ref:`AnimationPlayer<class_animationplayer>`'s animation bound to the ``AnimationTreePlayer``'s animation node with name ``id``.
  165. .. _class_AnimationTreePlayer_animation_node_get_master_animation:
  166. - :ref:`String<class_string>` **animation_node_get_master_animation** **(** :ref:`String<class_string>` id **)** const
  167. Returns the name of the :ref:`master_player<class_AnimationTreePlayer_master_player>`'s animation bound to this animation node.
  168. .. _class_AnimationTreePlayer_animation_node_set_animation:
  169. - void **animation_node_set_animation** **(** :ref:`String<class_string>` id, :ref:`Animation<class_animation>` animation **)**
  170. Binds a new animation from the :ref:`master_player<class_AnimationTreePlayer_master_player>` to the ``AnimationTreePlayer``'s animation node with name ``id``.
  171. .. _class_AnimationTreePlayer_animation_node_set_filter_path:
  172. - void **animation_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  173. 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.
  174. .. _class_AnimationTreePlayer_animation_node_set_master_animation:
  175. - void **animation_node_set_master_animation** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` source **)**
  176. Binds the animation named ``source`` from :ref:`master_player<class_AnimationTreePlayer_master_player>` to the animation node ``id``. Recalculates caches.
  177. .. _class_AnimationTreePlayer_are_nodes_connected:
  178. - :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
  179. Returns whether node ``id`` and ``dst_id`` are connected at the specified slot.
  180. .. _class_AnimationTreePlayer_blend2_node_get_amount:
  181. - :ref:`float<class_float>` **blend2_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  182. Returns the blend amount of a Blend2 node given its name.
  183. .. _class_AnimationTreePlayer_blend2_node_set_amount:
  184. - void **blend2_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
  185. Sets the blend amount of a Blend2 node given its name and value.
  186. .. _class_AnimationTreePlayer_blend2_node_set_filter_path:
  187. - void **blend2_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  188. If ``enable`` is ``true``, the blend2 node with ID ``id`` turns off the track modifying the property at ``path``. The modified node's children continue to animate.
  189. .. _class_AnimationTreePlayer_blend3_node_get_amount:
  190. - :ref:`float<class_float>` **blend3_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  191. Returns the blend amount of a Blend3 node given its name.
  192. .. _class_AnimationTreePlayer_blend3_node_set_amount:
  193. - void **blend3_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
  194. Sets the blend amount of a Blend3 node given its name and value.
  195. .. _class_AnimationTreePlayer_blend4_node_get_amount:
  196. - :ref:`Vector2<class_vector2>` **blend4_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  197. Returns the blend amount of a Blend4 node given its name.
  198. .. _class_AnimationTreePlayer_blend4_node_set_amount:
  199. - void **blend4_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` blend **)**
  200. Sets the blend amount of a Blend4 node given its name and value.
  201. .. _class_AnimationTreePlayer_connect_nodes:
  202. - :ref:`int<class_int>` **connect_nodes** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)**
  203. Connects node ``id`` to ``dst_id`` at the specified input slot.
  204. .. _class_AnimationTreePlayer_disconnect_nodes:
  205. - void **disconnect_nodes** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` dst_input_idx **)**
  206. Disconnects nodes connected to ``id`` at the specified input slot.
  207. .. _class_AnimationTreePlayer_get_node_list:
  208. - :ref:`PoolStringArray<class_poolstringarray>` **get_node_list** **(** **)**
  209. Returns a PoolStringArray containing the name of all nodes.
  210. .. _class_AnimationTreePlayer_mix_node_get_amount:
  211. - :ref:`float<class_float>` **mix_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  212. Returns mix amount of a Mix node given its name.
  213. .. _class_AnimationTreePlayer_mix_node_set_amount:
  214. - void **mix_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)**
  215. Sets mix amount of a Mix node given its name and value.
  216. .. _class_AnimationTreePlayer_node_exists:
  217. - :ref:`bool<class_bool>` **node_exists** **(** :ref:`String<class_string>` node **)** const
  218. Check if a node exists (by name).
  219. .. _class_AnimationTreePlayer_node_get_input_count:
  220. - :ref:`int<class_int>` **node_get_input_count** **(** :ref:`String<class_string>` id **)** const
  221. Return the input count for a given node. Different types of nodes have different amount of inputs.
  222. .. _class_AnimationTreePlayer_node_get_input_source:
  223. - :ref:`String<class_string>` **node_get_input_source** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` idx **)** const
  224. Return the input source for a given node input.
  225. .. _class_AnimationTreePlayer_node_get_position:
  226. - :ref:`Vector2<class_vector2>` **node_get_position** **(** :ref:`String<class_string>` id **)** const
  227. Returns position of a node in the graph given its name.
  228. .. _class_AnimationTreePlayer_node_get_type:
  229. - :ref:`int<class_int>` **node_get_type** **(** :ref:`String<class_string>` id **)** const
  230. Get the node type, will return from NODE\_\* enum.
  231. .. _class_AnimationTreePlayer_node_rename:
  232. - :ref:`int<class_int>` **node_rename** **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)**
  233. Rename a node in the graph.
  234. .. _class_AnimationTreePlayer_node_set_position:
  235. - void **node_set_position** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_position **)**
  236. Sets position of a node in the graph given its name and position.
  237. .. _class_AnimationTreePlayer_oneshot_node_get_autorestart_delay:
  238. - :ref:`float<class_float>` **oneshot_node_get_autorestart_delay** **(** :ref:`String<class_string>` id **)** const
  239. Returns autostart delay of a OneShot node given its name.
  240. .. _class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay:
  241. - :ref:`float<class_float>` **oneshot_node_get_autorestart_random_delay** **(** :ref:`String<class_string>` id **)** const
  242. Returns autostart random delay of a OneShot node given its name.
  243. .. _class_AnimationTreePlayer_oneshot_node_get_fadein_time:
  244. - :ref:`float<class_float>` **oneshot_node_get_fadein_time** **(** :ref:`String<class_string>` id **)** const
  245. Returns fade in time of a OneShot node given its name.
  246. .. _class_AnimationTreePlayer_oneshot_node_get_fadeout_time:
  247. - :ref:`float<class_float>` **oneshot_node_get_fadeout_time** **(** :ref:`String<class_string>` id **)** const
  248. Returns fade out time of a OneShot node given its name.
  249. .. _class_AnimationTreePlayer_oneshot_node_has_autorestart:
  250. - :ref:`bool<class_bool>` **oneshot_node_has_autorestart** **(** :ref:`String<class_string>` id **)** const
  251. Returns whether a OneShot node will auto restart given its name.
  252. .. _class_AnimationTreePlayer_oneshot_node_is_active:
  253. - :ref:`bool<class_bool>` **oneshot_node_is_active** **(** :ref:`String<class_string>` id **)** const
  254. Returns whether a OneShot node is active given its name.
  255. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart:
  256. - void **oneshot_node_set_autorestart** **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)**
  257. Sets autorestart property of a OneShot node given its name and value.
  258. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart_delay:
  259. - void **oneshot_node_set_autorestart_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` delay_sec **)**
  260. Sets autorestart delay of a OneShot node given its name and value in seconds.
  261. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay:
  262. - void **oneshot_node_set_autorestart_random_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` rand_sec **)**
  263. Sets autorestart random delay of a OneShot node given its name and value in seconds.
  264. .. _class_AnimationTreePlayer_oneshot_node_set_fadein_time:
  265. - void **oneshot_node_set_fadein_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
  266. Sets fade in time of a OneShot node given its name and value in seconds.
  267. .. _class_AnimationTreePlayer_oneshot_node_set_fadeout_time:
  268. - void **oneshot_node_set_fadeout_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
  269. Sets fade out time of a OneShot node given its name and value in seconds.
  270. .. _class_AnimationTreePlayer_oneshot_node_set_filter_path:
  271. - void **oneshot_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  272. 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.
  273. .. _class_AnimationTreePlayer_oneshot_node_start:
  274. - void **oneshot_node_start** **(** :ref:`String<class_string>` id **)**
  275. Starts a OneShot node given its name.
  276. .. _class_AnimationTreePlayer_oneshot_node_stop:
  277. - void **oneshot_node_stop** **(** :ref:`String<class_string>` id **)**
  278. Stops the OneShot node with name ``id``.
  279. .. _class_AnimationTreePlayer_recompute_caches:
  280. - void **recompute_caches** **(** **)**
  281. Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
  282. .. _class_AnimationTreePlayer_remove_node:
  283. - void **remove_node** **(** :ref:`String<class_string>` id **)**
  284. Removes the animation node with name ``id``.
  285. .. _class_AnimationTreePlayer_reset:
  286. - void **reset** **(** **)**
  287. Resets this AnimationTreePlayer.
  288. .. _class_AnimationTreePlayer_timescale_node_get_scale:
  289. - :ref:`float<class_float>` **timescale_node_get_scale** **(** :ref:`String<class_string>` id **)** const
  290. Returns time scale value of the TimeScale node with name ``id``.
  291. .. _class_AnimationTreePlayer_timescale_node_set_scale:
  292. - void **timescale_node_set_scale** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)**
  293. Sets the time scale of the TimeScale node with name ``id`` to ``scale``.
  294. .. _class_AnimationTreePlayer_timeseek_node_seek:
  295. - void **timeseek_node_seek** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` seconds **)**
  296. Sets the time seek value of the TimeSeek node with name ``id`` to ``seconds``
  297. .. _class_AnimationTreePlayer_transition_node_delete_input:
  298. - void **transition_node_delete_input** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
  299. Deletes the input at ``input_idx`` for the transition node with name ``id``.
  300. .. _class_AnimationTreePlayer_transition_node_get_current:
  301. - :ref:`int<class_int>` **transition_node_get_current** **(** :ref:`String<class_string>` id **)** const
  302. Returns the index of the currently evaluated input for the transition node with name ``id``.
  303. .. _class_AnimationTreePlayer_transition_node_get_input_count:
  304. - :ref:`int<class_int>` **transition_node_get_input_count** **(** :ref:`String<class_string>` id **)** const
  305. Returns the number of inputs for the transition node with name ``id``.
  306. .. _class_AnimationTreePlayer_transition_node_get_xfade_time:
  307. - :ref:`float<class_float>` **transition_node_get_xfade_time** **(** :ref:`String<class_string>` id **)** const
  308. Returns the cross fade time for the transition node with name ``id``.
  309. .. _class_AnimationTreePlayer_transition_node_has_input_auto_advance:
  310. - :ref:`bool<class_bool>` **transition_node_has_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** const
  311. Returns ``true`` if the input at ``input_idx`` on transition node with name ``id`` is set to automatically advance to the next input upon completion.
  312. .. _class_AnimationTreePlayer_transition_node_set_current:
  313. - void **transition_node_set_current** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
  314. The transition node with name ``id`` sets its current input at ``input_idx``.
  315. .. _class_AnimationTreePlayer_transition_node_set_input_auto_advance:
  316. - void **transition_node_set_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)**
  317. The transition node with name ``id`` advances to its next input automatically when the input at ``input_idx`` completes.
  318. .. _class_AnimationTreePlayer_transition_node_set_input_count:
  319. - void **transition_node_set_input_count** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)**
  320. Resizes the number of inputs available for the transition node with name ``id``.
  321. .. _class_AnimationTreePlayer_transition_node_set_xfade_time:
  322. - void **transition_node_set_xfade_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
  323. The transition node with name ``id`` sets its cross fade time to ``time_sec``.