:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationTree.xml. .. _class_AnimationTree: AnimationTree ============= **Inherits:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` A node used for advanced animation transitions in an :ref:`AnimationPlayer`. .. rst-class:: classref-introduction-group Description ----------- A node used for advanced animation transitions in an :ref:`AnimationPlayer`. \ **Note:** When linked with an :ref:`AnimationPlayer`, several properties and methods of the corresponding :ref:`AnimationPlayer` will not function as expected. Playback and transitions should be handled using only the **AnimationTree** and its constituent :ref:`AnimationNode`\ (s). The :ref:`AnimationPlayer` node should be used solely for adding, deleting, and editing animations. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`AnimationCallbackModeDiscrete` | callback_mode_discrete | ``2`` (overrides :ref:`AnimationMixer`) | +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | deterministic | ``true`` (overrides :ref:`AnimationMixer`) | +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`AnimationRootNode` | :ref:`tree_root` | | +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationProcessCallback` | :ref:`get_process_callback`\ (\ ) |const| | +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_process_callback`\ (\ mode\: :ref:`AnimationProcessCallback`\ ) | +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationTree_signal_animation_player_changed: .. rst-class:: classref-signal **animation_player_changed**\ (\ ) :ref:`🔗` Emitted when the :ref:`anim_player` is changed. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationTree_AnimationProcessCallback: .. rst-class:: classref-enumeration enum **AnimationProcessCallback**: :ref:`🔗` .. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS: .. rst-class:: classref-enumeration-constant :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` **Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`. .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: .. rst-class:: classref-enumeration-constant :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` **Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE`. .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: .. rst-class:: classref-enumeration-constant :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` **Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationTree_property_advance_expression_base_node: .. rst-class:: classref-property :ref:`NodePath` **advance_expression_base_node** = ``NodePath(".")`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_advance_expression_base_node**\ (\ value\: :ref:`NodePath`\ ) - :ref:`NodePath` **get_advance_expression_base_node**\ (\ ) The path to the :ref:`Node` used to evaluate the :ref:`AnimationNode` :ref:`Expression` if one is not explicitly specified internally. .. rst-class:: classref-item-separator ---- .. _class_AnimationTree_property_anim_player: .. rst-class:: classref-property :ref:`NodePath` **anim_player** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_animation_player**\ (\ value\: :ref:`NodePath`\ ) - :ref:`NodePath` **get_animation_player**\ (\ ) The path to the :ref:`AnimationPlayer` used for animating. .. rst-class:: classref-item-separator ---- .. _class_AnimationTree_property_tree_root: .. rst-class:: classref-property :ref:`AnimationRootNode` **tree_root** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_tree_root**\ (\ value\: :ref:`AnimationRootNode`\ ) - :ref:`AnimationRootNode` **get_tree_root**\ (\ ) The root animation node of this **AnimationTree**. See :ref:`AnimationRootNode`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AnimationTree_method_get_process_callback: .. rst-class:: classref-method :ref:`AnimationProcessCallback` **get_process_callback**\ (\ ) |const| :ref:`🔗` **Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. Returns the process notification in which to update animations. .. rst-class:: classref-item-separator ---- .. _class_AnimationTree_method_set_process_callback: .. rst-class:: classref-method |void| **set_process_callback**\ (\ mode\: :ref:`AnimationProcessCallback`\ ) :ref:`🔗` **Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. Sets the process notification in which to update animations. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`