:github_url: hide .. _class_AnimationTree: AnimationTree ============= **Hereda:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` Un nodo para usarse en transiciones de animación avanzadas en un :ref:`AnimationPlayer`. .. rst-class:: classref-introduction-group Descripción ---------------------- 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 Tutoriales -------------------- - :doc:`Usando AnimationTree <../tutorials/animation/animation_tree>` - `Demo de Shooter en Tercera Persona (TPS) `__ .. rst-class:: classref-reftable-group Propiedades ---------------------- .. 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 Métodos -------------- .. 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 Señales -------------- .. _class_AnimationTree_signal_animation_player_changed: .. rst-class:: classref-signal **animation_player_changed**\ (\ ) :ref:`🔗` Emitida cuando :ref:`anim_player` cambia. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumeraciones -------------------------- .. _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`` **Obsoleto:** 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`` **Obsoleto:** 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`` **Obsoleto:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descripciones de Propiedades -------------------------------------------------------- .. _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**\ (\ ) El path al :ref:`Node` usado para evaluar el :ref:`AnimationNode` :ref:`Expression` si no se especifica una explícitamente de manera interna. .. 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**\ (\ ) La ruta al :ref:`AnimationPlayer` utilizada para la animacion. .. 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**\ (\ ) El nodo de animación raíz de este **AnimationTree**. Véase :ref:`AnimationRootNode`. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descripciones de Métodos ------------------------------------------------ .. _class_AnimationTree_method_get_process_callback: .. rst-class:: classref-method :ref:`AnimationProcessCallback` **get_process_callback**\ (\ ) |const| :ref:`🔗` **Obsoleto:** Use :ref:`AnimationMixer.callback_mode_process` instead. Devuelve la notificación del proceso en el que se actualizarán las animaciones. .. rst-class:: classref-item-separator ---- .. _class_AnimationTree_method_set_process_callback: .. rst-class:: classref-method |void| **set_process_callback**\ (\ mode\: :ref:`AnimationProcessCallback`\ ) :ref:`🔗` **Obsoleto:** Use :ref:`AnimationMixer.callback_mode_process` instead. Establece la notificación de proceso en la que se actualizan las animaciones. .. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)` .. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)` .. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)` .. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)` .. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)` .. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)` .. |void| replace:: :abbr:`void (Sin valor de retorno.)`