: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:`Node` **<** :ref:`Object` A node to be used for advanced animation transitions in an :ref:`AnimationPlayer`. Description ----------- A node to be 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. Tutorials --------- - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `Third Person Shooter Demo `__ Properties ---------- +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`active` | ``false`` | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`AnimationProcessCallback` | :ref:`process_callback` | ``1`` | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ | :ref:`AnimationNode` | :ref:`tree_root` | | +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ Methods ------- +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`advance` **(** :ref:`float` delta **)** | +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_root_motion_transform` **(** **)** |const| | +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rename_parameter` **(** :ref:`String` old_name, :ref:`String` new_name **)** | +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_AnimationTree_AnimationProcessCallback: .. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS: .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: enum **AnimationProcessCallback**: - **ANIMATION_PROCESS_PHYSICS** = **0** --- The animations will progress during the physics frame (i.e. :ref:`Node._physics_process`). - **ANIMATION_PROCESS_IDLE** = **1** --- The animations will progress during the idle frame (i.e. :ref:`Node._process`). - **ANIMATION_PROCESS_MANUAL** = **2** --- The animations will only progress manually (see :ref:`advance`). Property Descriptions --------------------- .. _class_AnimationTree_property_active: - :ref:`bool` **active** +-----------+-------------------+ | *Default* | ``false`` | +-----------+-------------------+ | *Setter* | set_active(value) | +-----------+-------------------+ | *Getter* | is_active() | +-----------+-------------------+ If ``true``, the ``AnimationTree`` will be processing. ---- .. _class_AnimationTree_property_advance_expression_base_node: - :ref:`NodePath` **advance_expression_base_node** +-----------+-----------------------------------------+ | *Default* | ``NodePath(".")`` | +-----------+-----------------------------------------+ | *Setter* | set_advance_expression_base_node(value) | +-----------+-----------------------------------------+ | *Getter* | get_advance_expression_base_node() | +-----------+-----------------------------------------+ The path to the :ref:`Node` used to evaluate the AnimationNode :ref:`Expression` if one is not explicitly specified internally. ---- .. _class_AnimationTree_property_anim_player: - :ref:`NodePath` **anim_player** +-----------+-----------------------------+ | *Default* | ``NodePath("")`` | +-----------+-----------------------------+ | *Setter* | set_animation_player(value) | +-----------+-----------------------------+ | *Getter* | get_animation_player() | +-----------+-----------------------------+ The path to the :ref:`AnimationPlayer` used for animating. ---- .. _class_AnimationTree_property_process_callback: - :ref:`AnimationProcessCallback` **process_callback** +-----------+-----------------------------+ | *Default* | ``1`` | +-----------+-----------------------------+ | *Setter* | set_process_callback(value) | +-----------+-----------------------------+ | *Getter* | get_process_callback() | +-----------+-----------------------------+ The process mode of this ``AnimationTree``. See :ref:`AnimationProcessCallback` for available modes. ---- .. _class_AnimationTree_property_root_motion_track: - :ref:`NodePath` **root_motion_track** +-----------+------------------------------+ | *Default* | ``NodePath("")`` | +-----------+------------------------------+ | *Setter* | set_root_motion_track(value) | +-----------+------------------------------+ | *Getter* | get_root_motion_track() | +-----------+------------------------------+ The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by ``":"``. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``. If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D` or :ref:`Animation.TYPE_SCALE_3D` the transformation will be cancelled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_transform` and :ref:`RootMotionView`. ---- .. _class_AnimationTree_property_tree_root: - :ref:`AnimationNode` **tree_root** +----------+----------------------+ | *Setter* | set_tree_root(value) | +----------+----------------------+ | *Getter* | get_tree_root() | +----------+----------------------+ The root animation node of this ``AnimationTree``. See :ref:`AnimationNode`. Method Descriptions ------------------- .. _class_AnimationTree_method_advance: - void **advance** **(** :ref:`float` delta **)** Manually advance the animations by the specified time (in seconds). ---- .. _class_AnimationTree_method_get_root_motion_transform: - :ref:`Transform3D` **get_root_motion_transform** **(** **)** |const| Retrieve the motion of the :ref:`root_motion_track` as a :ref:`Transform3D` that can be used elsewhere. If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_SCALE_3D` or :ref:`Animation.TYPE_ROTATION_3D`, returns an identity transformation. See also :ref:`root_motion_track` and :ref:`RootMotionView`. ---- .. _class_AnimationTree_method_rename_parameter: - void **rename_parameter** **(** :ref:`String` old_name, :ref:`String` new_name **)** .. |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.)`