class_animationnodeanimation.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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/AnimationNodeAnimation.xml.
  6. .. _class_AnimationNodeAnimation:
  7. AnimationNodeAnimation
  8. ======================
  9. **Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. An input animation for an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Only has one output port using the :ref:`animation<class_AnimationNodeAnimation_property_animation>` property. Used as an input for :ref:`AnimationNode<class_AnimationNode>`\ s that blend animations together.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  19. - `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__
  20. - `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`advance_on_start<class_AnimationNodeAnimation_property_advance_on_start>` | ``false`` |
  28. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  29. | :ref:`StringName<class_StringName>` | :ref:`animation<class_AnimationNodeAnimation_property_animation>` | ``&""`` |
  30. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  31. | :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_AnimationNodeAnimation_property_loop_mode>` | |
  32. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  33. | :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` | :ref:`play_mode<class_AnimationNodeAnimation_property_play_mode>` | ``0`` |
  34. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  35. | :ref:`float<class_float>` | :ref:`start_offset<class_AnimationNodeAnimation_property_start_offset>` | |
  36. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  37. | :ref:`bool<class_bool>` | :ref:`stretch_time_scale<class_AnimationNodeAnimation_property_stretch_time_scale>` | |
  38. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  39. | :ref:`float<class_float>` | :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` | |
  40. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  41. | :ref:`bool<class_bool>` | :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` | ``false`` |
  42. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Enumerations
  47. ------------
  48. .. _enum_AnimationNodeAnimation_PlayMode:
  49. .. rst-class:: classref-enumeration
  50. enum **PlayMode**: :ref:`🔗<enum_AnimationNodeAnimation_PlayMode>`
  51. .. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_FORWARD** = ``0``
  54. Plays animation in forward direction.
  55. .. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_BACKWARD** = ``1``
  58. Plays animation in backward direction.
  59. .. rst-class:: classref-section-separator
  60. ----
  61. .. rst-class:: classref-descriptions-group
  62. Property Descriptions
  63. ---------------------
  64. .. _class_AnimationNodeAnimation_property_advance_on_start:
  65. .. rst-class:: classref-property
  66. :ref:`bool<class_bool>` **advance_on_start** = ``false`` :ref:`🔗<class_AnimationNodeAnimation_property_advance_on_start>`
  67. .. rst-class:: classref-property-setget
  68. - |void| **set_advance_on_start**\ (\ value\: :ref:`bool<class_bool>`\ )
  69. - :ref:`bool<class_bool>` **is_advance_on_start**\ (\ )
  70. 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.
  71. See also the notes of :ref:`AnimationPlayer.play()<class_AnimationPlayer_method_play>`.
  72. .. rst-class:: classref-item-separator
  73. ----
  74. .. _class_AnimationNodeAnimation_property_animation:
  75. .. rst-class:: classref-property
  76. :ref:`StringName<class_StringName>` **animation** = ``&""`` :ref:`🔗<class_AnimationNodeAnimation_property_animation>`
  77. .. rst-class:: classref-property-setget
  78. - |void| **set_animation**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  79. - :ref:`StringName<class_StringName>` **get_animation**\ (\ )
  80. Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player<class_AnimationTree_property_anim_player>`.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_AnimationNodeAnimation_property_loop_mode:
  84. .. rst-class:: classref-property
  85. :ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode** :ref:`🔗<class_AnimationNodeAnimation_property_loop_mode>`
  86. .. rst-class:: classref-property-setget
  87. - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode<enum_Animation_LoopMode>`\ )
  88. - :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode**\ (\ )
  89. If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` is ``true``, override the loop settings of the original :ref:`Animation<class_Animation>` resource with the value.
  90. \ **Note:** If the :ref:`Animation.loop_mode<class_Animation_property_loop_mode>` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap()<class_Animation_method_track_set_interpolation_loop_wrap>` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation<class_Animation>` resource and changing the loop settings.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_AnimationNodeAnimation_property_play_mode:
  94. .. rst-class:: classref-property
  95. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **play_mode** = ``0`` :ref:`🔗<class_AnimationNodeAnimation_property_play_mode>`
  96. .. rst-class:: classref-property-setget
  97. - |void| **set_play_mode**\ (\ value\: :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>`\ )
  98. - :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **get_play_mode**\ (\ )
  99. Determines the playback direction of the animation.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_AnimationNodeAnimation_property_start_offset:
  103. .. rst-class:: classref-property
  104. :ref:`float<class_float>` **start_offset** :ref:`🔗<class_AnimationNodeAnimation_property_start_offset>`
  105. .. rst-class:: classref-property-setget
  106. - |void| **set_start_offset**\ (\ value\: :ref:`float<class_float>`\ )
  107. - :ref:`float<class_float>` **get_start_offset**\ (\ )
  108. If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` is ``true``, offset the start position of the animation.
  109. This is useful for adjusting which foot steps first in 3D walking animations.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_AnimationNodeAnimation_property_stretch_time_scale:
  113. .. rst-class:: classref-property
  114. :ref:`bool<class_bool>` **stretch_time_scale** :ref:`🔗<class_AnimationNodeAnimation_property_stretch_time_scale>`
  115. .. rst-class:: classref-property-setget
  116. - |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool<class_bool>`\ )
  117. - :ref:`bool<class_bool>` **is_stretching_time_scale**\ (\ )
  118. If ``true``, scales the time so that the length specified in :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` is one cycle.
  119. This is useful for matching the periods of walking and running animations.
  120. If ``false``, the original animation length is respected. If you set the loop to :ref:`loop_mode<class_AnimationNodeAnimation_property_loop_mode>`, the animation will loop in :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>`.
  121. .. rst-class:: classref-item-separator
  122. ----
  123. .. _class_AnimationNodeAnimation_property_timeline_length:
  124. .. rst-class:: classref-property
  125. :ref:`float<class_float>` **timeline_length** :ref:`🔗<class_AnimationNodeAnimation_property_timeline_length>`
  126. .. rst-class:: classref-property-setget
  127. - |void| **set_timeline_length**\ (\ value\: :ref:`float<class_float>`\ )
  128. - :ref:`float<class_float>` **get_timeline_length**\ (\ )
  129. If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` is ``true``, offset the start position of the animation.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_AnimationNodeAnimation_property_use_custom_timeline:
  133. .. rst-class:: classref-property
  134. :ref:`bool<class_bool>` **use_custom_timeline** = ``false`` :ref:`🔗<class_AnimationNodeAnimation_property_use_custom_timeline>`
  135. .. rst-class:: classref-property-setget
  136. - |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool<class_bool>`\ )
  137. - :ref:`bool<class_bool>` **is_using_custom_timeline**\ (\ )
  138. If ``true``, :ref:`AnimationNode<class_AnimationNode>` provides an animation based on the :ref:`Animation<class_Animation>` resource with some parameters adjusted.
  139. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  140. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  141. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  142. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  143. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  144. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  145. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  146. .. |void| replace:: :abbr:`void (No return value.)`