class_animationtree.rst 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationTree.xml.
  6. .. _class_AnimationTree:
  7. AnimationTree
  8. =============
  9. **Inherits:** :ref:`AnimationMixer<class_AnimationMixer>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A node used for advanced animation transitions in an :ref:`AnimationPlayer<class_AnimationPlayer>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A node used for advanced animation transitions in an :ref:`AnimationPlayer<class_AnimationPlayer>`.
  15. \ **Note:** When linked with an :ref:`AnimationPlayer<class_AnimationPlayer>`, several properties and methods of the corresponding :ref:`AnimationPlayer<class_AnimationPlayer>` will not function as expected. Playback and transitions should be handled using only the **AnimationTree** and its constituent :ref:`AnimationNode<class_AnimationNode>`\ (s). The :ref:`AnimationPlayer<class_AnimationPlayer>` node should be used solely for adding, deleting, and editing animations.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  20. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
  27. | :ref:`NodePath<class_NodePath>` | :ref:`advance_expression_base_node<class_AnimationTree_property_advance_expression_base_node>` | ``NodePath(".")`` |
  28. +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
  29. | :ref:`NodePath<class_NodePath>` | :ref:`anim_player<class_AnimationTree_property_anim_player>` | ``NodePath("")`` |
  30. +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | deterministic | ``true`` (overrides :ref:`AnimationMixer<class_AnimationMixer_property_deterministic>`) |
  32. +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
  33. | :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`tree_root<class_AnimationTree_property_tree_root>` | |
  34. +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
  35. .. rst-class:: classref-reftable-group
  36. Methods
  37. -------
  38. .. table::
  39. :widths: auto
  40. +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` | :ref:`get_process_callback<class_AnimationTree_method_get_process_callback>` **(** **)** |const| |
  42. +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_process_callback<class_AnimationTree_method_set_process_callback>` **(** :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` mode **)** |
  44. +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. .. rst-class:: classref-section-separator
  46. ----
  47. .. rst-class:: classref-descriptions-group
  48. Signals
  49. -------
  50. .. _class_AnimationTree_signal_animation_player_changed:
  51. .. rst-class:: classref-signal
  52. **animation_player_changed** **(** **)**
  53. Emitted when the :ref:`anim_player<class_AnimationTree_property_anim_player>` is changed.
  54. .. rst-class:: classref-section-separator
  55. ----
  56. .. rst-class:: classref-descriptions-group
  57. Enumerations
  58. ------------
  59. .. _enum_AnimationTree_AnimationProcessCallback:
  60. .. rst-class:: classref-enumeration
  61. enum **AnimationProcessCallback**:
  62. .. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS:
  63. .. rst-class:: classref-enumeration-constant
  64. :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_PHYSICS** = ``0``
  65. For backward compatibility. See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`.
  66. .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_IDLE** = ``1``
  69. For backward compatibility. See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE>`.
  70. .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_MANUAL** = ``2``
  73. For backward compatibility. See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL>`.
  74. .. rst-class:: classref-section-separator
  75. ----
  76. .. rst-class:: classref-descriptions-group
  77. Property Descriptions
  78. ---------------------
  79. .. _class_AnimationTree_property_advance_expression_base_node:
  80. .. rst-class:: classref-property
  81. :ref:`NodePath<class_NodePath>` **advance_expression_base_node** = ``NodePath(".")``
  82. .. rst-class:: classref-property-setget
  83. - void **set_advance_expression_base_node** **(** :ref:`NodePath<class_NodePath>` value **)**
  84. - :ref:`NodePath<class_NodePath>` **get_advance_expression_base_node** **(** **)**
  85. The path to the :ref:`Node<class_Node>` used to evaluate the :ref:`AnimationNode<class_AnimationNode>` :ref:`Expression<class_Expression>` if one is not explicitly specified internally.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_AnimationTree_property_anim_player:
  89. .. rst-class:: classref-property
  90. :ref:`NodePath<class_NodePath>` **anim_player** = ``NodePath("")``
  91. .. rst-class:: classref-property-setget
  92. - void **set_animation_player** **(** :ref:`NodePath<class_NodePath>` value **)**
  93. - :ref:`NodePath<class_NodePath>` **get_animation_player** **(** **)**
  94. The path to the :ref:`AnimationPlayer<class_AnimationPlayer>` used for animating.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_AnimationTree_property_tree_root:
  98. .. rst-class:: classref-property
  99. :ref:`AnimationRootNode<class_AnimationRootNode>` **tree_root**
  100. .. rst-class:: classref-property-setget
  101. - void **set_tree_root** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` value **)**
  102. - :ref:`AnimationRootNode<class_AnimationRootNode>` **get_tree_root** **(** **)**
  103. The root animation node of this **AnimationTree**. See :ref:`AnimationRootNode<class_AnimationRootNode>`.
  104. .. rst-class:: classref-section-separator
  105. ----
  106. .. rst-class:: classref-descriptions-group
  107. Method Descriptions
  108. -------------------
  109. .. _class_AnimationTree_method_get_process_callback:
  110. .. rst-class:: classref-method
  111. :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **get_process_callback** **(** **)** |const|
  112. For backward compatibility. See :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_AnimationTree_method_set_process_callback:
  116. .. rst-class:: classref-method
  117. void **set_process_callback** **(** :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` mode **)**
  118. For backward compatibility. See :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`.
  119. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  120. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  121. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  122. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  123. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  124. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  125. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`