class_animationtreeplayer.rst 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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:`int<class_int>` | :ref:`get_animation_process_mode<class_AnimationTreePlayer_get_animation_process_mode>` **(** **)** const |
  50. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`NodePath<class_nodepath>` | :ref:`get_base_path<class_AnimationTreePlayer_get_base_path>` **(** **)** const |
  52. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`NodePath<class_nodepath>` | :ref:`get_master_player<class_AnimationTreePlayer_get_master_player>` **(** **)** const |
  54. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_node_list<class_AnimationTreePlayer_get_node_list>` **(** **)** |
  56. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`is_active<class_AnimationTreePlayer_is_active>` **(** **)** const |
  58. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`float<class_float>` | :ref:`mix_node_get_amount<class_AnimationTreePlayer_mix_node_get_amount>` **(** :ref:`String<class_string>` id **)** const |
  60. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`mix_node_set_amount<class_AnimationTreePlayer_mix_node_set_amount>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)** |
  62. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`node_exists<class_AnimationTreePlayer_node_exists>` **(** :ref:`String<class_string>` node **)** const |
  64. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`node_get_input_count<class_AnimationTreePlayer_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
  66. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :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 |
  68. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Vector2<class_vector2>` | :ref:`node_get_position<class_AnimationTreePlayer_node_get_position>` **(** :ref:`String<class_string>` id **)** const |
  70. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`int<class_int>` | :ref:`node_get_type<class_AnimationTreePlayer_node_get_type>` **(** :ref:`String<class_string>` id **)** const |
  72. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`int<class_int>` | :ref:`node_rename<class_AnimationTreePlayer_node_rename>` **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)** |
  74. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`node_set_position<class_AnimationTreePlayer_node_set_position>` **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_position **)** |
  76. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`float<class_float>` | :ref:`oneshot_node_get_autorestart_delay<class_AnimationTreePlayer_oneshot_node_get_autorestart_delay>` **(** :ref:`String<class_string>` id **)** const |
  78. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :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 |
  80. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadein_time<class_AnimationTreePlayer_oneshot_node_get_fadein_time>` **(** :ref:`String<class_string>` id **)** const |
  82. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`float<class_float>` | :ref:`oneshot_node_get_fadeout_time<class_AnimationTreePlayer_oneshot_node_get_fadeout_time>` **(** :ref:`String<class_string>` id **)** const |
  84. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`bool<class_bool>` | :ref:`oneshot_node_has_autorestart<class_AnimationTreePlayer_oneshot_node_has_autorestart>` **(** :ref:`String<class_string>` id **)** const |
  86. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`bool<class_bool>` | :ref:`oneshot_node_is_active<class_AnimationTreePlayer_oneshot_node_is_active>` **(** :ref:`String<class_string>` id **)** const |
  88. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`oneshot_node_set_autorestart<class_AnimationTreePlayer_oneshot_node_set_autorestart>` **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)** |
  90. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | 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 **)** |
  92. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | 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 **)** |
  94. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | 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 **)** |
  96. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | 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 **)** |
  98. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | 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 **)** |
  100. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`oneshot_node_start<class_AnimationTreePlayer_oneshot_node_start>` **(** :ref:`String<class_string>` id **)** |
  102. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`oneshot_node_stop<class_AnimationTreePlayer_oneshot_node_stop>` **(** :ref:`String<class_string>` id **)** |
  104. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`recompute_caches<class_AnimationTreePlayer_recompute_caches>` **(** **)** |
  106. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`remove_node<class_AnimationTreePlayer_remove_node>` **(** :ref:`String<class_string>` id **)** |
  108. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`reset<class_AnimationTreePlayer_reset>` **(** **)** |
  110. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`set_active<class_AnimationTreePlayer_set_active>` **(** :ref:`bool<class_bool>` enabled **)** |
  112. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`set_animation_process_mode<class_AnimationTreePlayer_set_animation_process_mode>` **(** :ref:`int<class_int>` mode **)** |
  114. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`set_base_path<class_AnimationTreePlayer_set_base_path>` **(** :ref:`NodePath<class_nodepath>` path **)** |
  116. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`set_master_player<class_AnimationTreePlayer_set_master_player>` **(** :ref:`NodePath<class_nodepath>` nodepath **)** |
  118. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`float<class_float>` | :ref:`timescale_node_get_scale<class_AnimationTreePlayer_timescale_node_get_scale>` **(** :ref:`String<class_string>` id **)** const |
  120. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`timescale_node_set_scale<class_AnimationTreePlayer_timescale_node_set_scale>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)** |
  122. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`timeseek_node_seek<class_AnimationTreePlayer_timeseek_node_seek>` **(** :ref:`String<class_string>` id, :ref:`float<class_float>` seconds **)** |
  124. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`transition_node_delete_input<class_AnimationTreePlayer_transition_node_delete_input>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
  126. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`int<class_int>` | :ref:`transition_node_get_current<class_AnimationTreePlayer_transition_node_get_current>` **(** :ref:`String<class_string>` id **)** const |
  128. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`int<class_int>` | :ref:`transition_node_get_input_count<class_AnimationTreePlayer_transition_node_get_input_count>` **(** :ref:`String<class_string>` id **)** const |
  130. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`float<class_float>` | :ref:`transition_node_get_xfade_time<class_AnimationTreePlayer_transition_node_get_xfade_time>` **(** :ref:`String<class_string>` id **)** const |
  132. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :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 |
  134. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`transition_node_set_current<class_AnimationTreePlayer_transition_node_set_current>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** |
  136. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | 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 **)** |
  138. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | void | :ref:`transition_node_set_input_count<class_AnimationTreePlayer_transition_node_set_input_count>` **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)** |
  140. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | 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 **)** |
  142. +------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. Member Variables
  144. ----------------
  145. - :ref:`int<class_int>` **playback_process_mode**
  146. Numeric Constants
  147. -----------------
  148. - **NODE_OUTPUT** = **0** --- Output node.
  149. - **NODE_ANIMATION** = **1** --- Animation node.
  150. - **NODE_ONESHOT** = **2** --- OneShot node.
  151. - **NODE_MIX** = **3** --- Mix node.
  152. - **NODE_BLEND2** = **4** --- Blend2 node.
  153. - **NODE_BLEND3** = **5** --- Blend3 node.
  154. - **NODE_BLEND4** = **6** --- Blend4 node.
  155. - **NODE_TIMESCALE** = **7** --- TimeScale node.
  156. - **NODE_TIMESEEK** = **8** --- TimeSeek node.
  157. - **NODE_TRANSITION** = **9** --- Transition node.
  158. - **ANIMATION_PROCESS_FIXED** = **0**
  159. - **ANIMATION_PROCESS_IDLE** = **1**
  160. Description
  161. -----------
  162. Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
  163. Member Function Description
  164. ---------------------------
  165. .. _class_AnimationTreePlayer_add_node:
  166. - void **add_node** **(** :ref:`int<class_int>` type, :ref:`String<class_string>` id **)**
  167. Add a node of a given type in the graph with given id.
  168. .. _class_AnimationTreePlayer_advance:
  169. - void **advance** **(** :ref:`float<class_float>` delta **)**
  170. .. _class_AnimationTreePlayer_animation_node_get_animation:
  171. - :ref:`Animation<class_animation>` **animation_node_get_animation** **(** :ref:`String<class_string>` id **)** const
  172. Returns an animation given its name.
  173. .. _class_AnimationTreePlayer_animation_node_get_master_animation:
  174. - :ref:`String<class_string>` **animation_node_get_master_animation** **(** :ref:`String<class_string>` id **)** const
  175. .. _class_AnimationTreePlayer_animation_node_set_animation:
  176. - void **animation_node_set_animation** **(** :ref:`String<class_string>` id, :ref:`Animation<class_animation>` animation **)**
  177. Set the animation for an animation node.
  178. .. _class_AnimationTreePlayer_animation_node_set_filter_path:
  179. - void **animation_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  180. .. _class_AnimationTreePlayer_animation_node_set_master_animation:
  181. - void **animation_node_set_master_animation** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` source **)**
  182. .. _class_AnimationTreePlayer_are_nodes_connected:
  183. - :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
  184. Returns whether node ``id`` and ``dst_id`` are connected at the specified slot.
  185. .. _class_AnimationTreePlayer_blend2_node_get_amount:
  186. - :ref:`float<class_float>` **blend2_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  187. Returns the blend amount of a Blend2 node given its name.
  188. .. _class_AnimationTreePlayer_blend2_node_set_amount:
  189. - void **blend2_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
  190. Sets the blend amount of a Blend2 node given its name and value.
  191. .. _class_AnimationTreePlayer_blend2_node_set_filter_path:
  192. - void **blend2_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  193. .. _class_AnimationTreePlayer_blend3_node_get_amount:
  194. - :ref:`float<class_float>` **blend3_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  195. Returns the blend amount of a Blend3 node given its name.
  196. .. _class_AnimationTreePlayer_blend3_node_set_amount:
  197. - void **blend3_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` blend **)**
  198. Sets the blend amount of a Blend3 node given its name and value.
  199. .. _class_AnimationTreePlayer_blend4_node_get_amount:
  200. - :ref:`Vector2<class_vector2>` **blend4_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  201. Returns the blend amount of a Blend4 node given its name.
  202. .. _class_AnimationTreePlayer_blend4_node_set_amount:
  203. - void **blend4_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` blend **)**
  204. Sets the blend amount of a Blend4 node given its name and value.
  205. .. _class_AnimationTreePlayer_connect_nodes:
  206. - :ref:`int<class_int>` **connect_nodes** **(** :ref:`String<class_string>` id, :ref:`String<class_string>` dst_id, :ref:`int<class_int>` dst_input_idx **)**
  207. Connects node ``id`` to ``dst_id`` at the specified input slot.
  208. .. _class_AnimationTreePlayer_disconnect_nodes:
  209. - void **disconnect_nodes** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` dst_input_idx **)**
  210. Disconnects nodes connected to ``id`` at the specified input slot.
  211. .. _class_AnimationTreePlayer_get_animation_process_mode:
  212. - :ref:`int<class_int>` **get_animation_process_mode** **(** **)** const
  213. Returns playback process mode of this AnimationTreePlayer.
  214. .. _class_AnimationTreePlayer_get_base_path:
  215. - :ref:`NodePath<class_nodepath>` **get_base_path** **(** **)** const
  216. .. _class_AnimationTreePlayer_get_master_player:
  217. - :ref:`NodePath<class_nodepath>` **get_master_player** **(** **)** const
  218. .. _class_AnimationTreePlayer_get_node_list:
  219. - :ref:`PoolStringArray<class_poolstringarray>` **get_node_list** **(** **)**
  220. Returns a PoolStringArray containing the name of all nodes.
  221. .. _class_AnimationTreePlayer_is_active:
  222. - :ref:`bool<class_bool>` **is_active** **(** **)** const
  223. Returns whether this AnimationTreePlayer is active.
  224. .. _class_AnimationTreePlayer_mix_node_get_amount:
  225. - :ref:`float<class_float>` **mix_node_get_amount** **(** :ref:`String<class_string>` id **)** const
  226. Returns mix amount of a Mix node given its name.
  227. .. _class_AnimationTreePlayer_mix_node_set_amount:
  228. - void **mix_node_set_amount** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` ratio **)**
  229. Sets mix amount of a Mix node given its name and value.
  230. .. _class_AnimationTreePlayer_node_exists:
  231. - :ref:`bool<class_bool>` **node_exists** **(** :ref:`String<class_string>` node **)** const
  232. Check if a node exists (by name).
  233. .. _class_AnimationTreePlayer_node_get_input_count:
  234. - :ref:`int<class_int>` **node_get_input_count** **(** :ref:`String<class_string>` id **)** const
  235. Return the input count for a given node. Different types of nodes have different amount of inputs.
  236. .. _class_AnimationTreePlayer_node_get_input_source:
  237. - :ref:`String<class_string>` **node_get_input_source** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` idx **)** const
  238. Return the input source for a given node input.
  239. .. _class_AnimationTreePlayer_node_get_position:
  240. - :ref:`Vector2<class_vector2>` **node_get_position** **(** :ref:`String<class_string>` id **)** const
  241. Returns position of a node in the graph given its name.
  242. .. _class_AnimationTreePlayer_node_get_type:
  243. - :ref:`int<class_int>` **node_get_type** **(** :ref:`String<class_string>` id **)** const
  244. Get the node type, will return from NODE\_\* enum.
  245. .. _class_AnimationTreePlayer_node_rename:
  246. - :ref:`int<class_int>` **node_rename** **(** :ref:`String<class_string>` node, :ref:`String<class_string>` new_name **)**
  247. Rename a node in the graph.
  248. .. _class_AnimationTreePlayer_node_set_position:
  249. - void **node_set_position** **(** :ref:`String<class_string>` id, :ref:`Vector2<class_vector2>` screen_position **)**
  250. Sets position of a node in the graph given its name and position.
  251. .. _class_AnimationTreePlayer_oneshot_node_get_autorestart_delay:
  252. - :ref:`float<class_float>` **oneshot_node_get_autorestart_delay** **(** :ref:`String<class_string>` id **)** const
  253. Returns autostart delay of a OneShot node given its name.
  254. .. _class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay:
  255. - :ref:`float<class_float>` **oneshot_node_get_autorestart_random_delay** **(** :ref:`String<class_string>` id **)** const
  256. Returns autostart random delay of a OneShot node given its name.
  257. .. _class_AnimationTreePlayer_oneshot_node_get_fadein_time:
  258. - :ref:`float<class_float>` **oneshot_node_get_fadein_time** **(** :ref:`String<class_string>` id **)** const
  259. Returns fade in time of a OneShot node given its name.
  260. .. _class_AnimationTreePlayer_oneshot_node_get_fadeout_time:
  261. - :ref:`float<class_float>` **oneshot_node_get_fadeout_time** **(** :ref:`String<class_string>` id **)** const
  262. Returns fade out time of a OneShot node given its name.
  263. .. _class_AnimationTreePlayer_oneshot_node_has_autorestart:
  264. - :ref:`bool<class_bool>` **oneshot_node_has_autorestart** **(** :ref:`String<class_string>` id **)** const
  265. Returns whether a OneShot node will auto restart given its name.
  266. .. _class_AnimationTreePlayer_oneshot_node_is_active:
  267. - :ref:`bool<class_bool>` **oneshot_node_is_active** **(** :ref:`String<class_string>` id **)** const
  268. Returns whether a OneShot node is active given its name.
  269. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart:
  270. - void **oneshot_node_set_autorestart** **(** :ref:`String<class_string>` id, :ref:`bool<class_bool>` enable **)**
  271. Sets autorestart property of a OneShot node given its name and value.
  272. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart_delay:
  273. - void **oneshot_node_set_autorestart_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` delay_sec **)**
  274. Sets autorestart delay of a OneShot node given its name and value in seconds.
  275. .. _class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay:
  276. - void **oneshot_node_set_autorestart_random_delay** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` rand_sec **)**
  277. Sets autorestart random delay of a OneShot node given its name and value in seconds.
  278. .. _class_AnimationTreePlayer_oneshot_node_set_fadein_time:
  279. - void **oneshot_node_set_fadein_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
  280. Sets fade in time of a OneShot node given its name and value in seconds.
  281. .. _class_AnimationTreePlayer_oneshot_node_set_fadeout_time:
  282. - void **oneshot_node_set_fadeout_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**
  283. Sets fade out time of a OneShot node given its name and value in seconds.
  284. .. _class_AnimationTreePlayer_oneshot_node_set_filter_path:
  285. - void **oneshot_node_set_filter_path** **(** :ref:`String<class_string>` id, :ref:`NodePath<class_nodepath>` path, :ref:`bool<class_bool>` enable **)**
  286. .. _class_AnimationTreePlayer_oneshot_node_start:
  287. - void **oneshot_node_start** **(** :ref:`String<class_string>` id **)**
  288. Starts a OneShot node given its name.
  289. .. _class_AnimationTreePlayer_oneshot_node_stop:
  290. - void **oneshot_node_stop** **(** :ref:`String<class_string>` id **)**
  291. Stops a OneShot node given its name.
  292. .. _class_AnimationTreePlayer_recompute_caches:
  293. - void **recompute_caches** **(** **)**
  294. .. _class_AnimationTreePlayer_remove_node:
  295. - void **remove_node** **(** :ref:`String<class_string>` id **)**
  296. .. _class_AnimationTreePlayer_reset:
  297. - void **reset** **(** **)**
  298. Resets this AnimationTreePlayer.
  299. .. _class_AnimationTreePlayer_set_active:
  300. - void **set_active** **(** :ref:`bool<class_bool>` enabled **)**
  301. Sets whether this AnimationTreePlayer is active. AnimationTreePlayer will start processing if set to active.
  302. .. _class_AnimationTreePlayer_set_animation_process_mode:
  303. - void **set_animation_process_mode** **(** :ref:`int<class_int>` mode **)**
  304. Sets process mode (ANIMATION_PROCESS\_\*) of this AnimationTreePlayer.
  305. .. _class_AnimationTreePlayer_set_base_path:
  306. - void **set_base_path** **(** :ref:`NodePath<class_nodepath>` path **)**
  307. Sets base path of this AnimationTreePlayer.
  308. .. _class_AnimationTreePlayer_set_master_player:
  309. - void **set_master_player** **(** :ref:`NodePath<class_nodepath>` nodepath **)**
  310. .. _class_AnimationTreePlayer_timescale_node_get_scale:
  311. - :ref:`float<class_float>` **timescale_node_get_scale** **(** :ref:`String<class_string>` id **)** const
  312. Returns time scale value of a TimeScale node given its name.
  313. .. _class_AnimationTreePlayer_timescale_node_set_scale:
  314. - void **timescale_node_set_scale** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` scale **)**
  315. Sets time scale value of a TimeScale node given its name and value.
  316. .. _class_AnimationTreePlayer_timeseek_node_seek:
  317. - void **timeseek_node_seek** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` seconds **)**
  318. Sets time seek value of a TimeSeek node given its name and value.
  319. .. _class_AnimationTreePlayer_transition_node_delete_input:
  320. - void **transition_node_delete_input** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
  321. .. _class_AnimationTreePlayer_transition_node_get_current:
  322. - :ref:`int<class_int>` **transition_node_get_current** **(** :ref:`String<class_string>` id **)** const
  323. .. _class_AnimationTreePlayer_transition_node_get_input_count:
  324. - :ref:`int<class_int>` **transition_node_get_input_count** **(** :ref:`String<class_string>` id **)** const
  325. .. _class_AnimationTreePlayer_transition_node_get_xfade_time:
  326. - :ref:`float<class_float>` **transition_node_get_xfade_time** **(** :ref:`String<class_string>` id **)** const
  327. .. _class_AnimationTreePlayer_transition_node_has_input_auto_advance:
  328. - :ref:`bool<class_bool>` **transition_node_has_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)** const
  329. .. _class_AnimationTreePlayer_transition_node_set_current:
  330. - void **transition_node_set_current** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx **)**
  331. .. _class_AnimationTreePlayer_transition_node_set_input_auto_advance:
  332. - void **transition_node_set_input_auto_advance** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` input_idx, :ref:`bool<class_bool>` enable **)**
  333. .. _class_AnimationTreePlayer_transition_node_set_input_count:
  334. - void **transition_node_set_input_count** **(** :ref:`String<class_string>` id, :ref:`int<class_int>` count **)**
  335. .. _class_AnimationTreePlayer_transition_node_set_xfade_time:
  336. - void **transition_node_set_xfade_time** **(** :ref:`String<class_string>` id, :ref:`float<class_float>` time_sec **)**