: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/AnimationNodeAnimation.xml. .. _class_AnimationNodeAnimation: AnimationNodeAnimation ====================== **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` An input animation for an :ref:`AnimationNodeBlendTree`. .. rst-class:: classref-introduction-group Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. Only has one output port using the :ref:`animation` property. Used as an input for :ref:`AnimationNode`\ s that blend animations together. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` - `3D Platformer Demo `__ - `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`advance_on_start` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`StringName` | :ref:`animation` | ``&""`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`LoopMode` | :ref:`loop_mode` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`start_offset` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`stretch_time_scale` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`timeline_length` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_custom_timeline` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationNodeAnimation_PlayMode: .. rst-class:: classref-enumeration enum **PlayMode**: :ref:`🔗` .. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD: .. rst-class:: classref-enumeration-constant :ref:`PlayMode` **PLAY_MODE_FORWARD** = ``0`` Plays animation in forward direction. .. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD: .. rst-class:: classref-enumeration-constant :ref:`PlayMode` **PLAY_MODE_BACKWARD** = ``1`` Plays animation in backward direction. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeAnimation_property_advance_on_start: .. rst-class:: classref-property :ref:`bool` **advance_on_start** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_advance_on_start**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_advance_on_start**\ (\ ) If ``true``, on receiving a request to play an animation from the start, the first frame is not drawn, but only processed, and playback starts from the next frame. See also the notes of :ref:`AnimationPlayer.play()`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_animation: .. rst-class:: classref-property :ref:`StringName` **animation** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_animation**\ (\ value\: :ref:`StringName`\ ) - :ref:`StringName` **get_animation**\ (\ ) Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_loop_mode: .. rst-class:: classref-property :ref:`LoopMode` **loop_mode** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) - :ref:`LoopMode` **get_loop_mode**\ (\ ) If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. \ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap()` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_play_mode: .. rst-class:: classref-property :ref:`PlayMode` **play_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_play_mode**\ (\ value\: :ref:`PlayMode`\ ) - :ref:`PlayMode` **get_play_mode**\ (\ ) Determines the playback direction of the animation. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_start_offset: .. rst-class:: classref-property :ref:`float` **start_offset** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_start_offset**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_start_offset**\ (\ ) If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. This is useful for adjusting which foot steps first in 3D walking animations. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_stretch_time_scale: .. rst-class:: classref-property :ref:`bool` **stretch_time_scale** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_stretching_time_scale**\ (\ ) If ``true``, scales the time so that the length specified in :ref:`timeline_length` is one cycle. This is useful for matching the periods of walking and running animations. If ``false``, the original animation length is respected. If you set the loop to :ref:`loop_mode`, the animation will loop in :ref:`timeline_length`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_timeline_length: .. rst-class:: classref-property :ref:`float` **timeline_length** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_timeline_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_timeline_length**\ (\ ) If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeAnimation_property_use_custom_timeline: .. rst-class:: classref-property :ref:`bool` **use_custom_timeline** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_custom_timeline**\ (\ ) If ``true``, :ref:`AnimationNode` provides an animation based on the :ref:`Animation` resource with some parameters adjusted. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)`