class_animationnodeanimation.rst 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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:`StringName<class_StringName>` | :ref:`animation<class_AnimationNodeAnimation_property_animation>` | ``&""`` |
  28. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  29. | :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_AnimationNodeAnimation_property_loop_mode>` | |
  30. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  31. | :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` | :ref:`play_mode<class_AnimationNodeAnimation_property_play_mode>` | ``0`` |
  32. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  33. | :ref:`float<class_float>` | :ref:`start_offset<class_AnimationNodeAnimation_property_start_offset>` | |
  34. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  35. | :ref:`bool<class_bool>` | :ref:`stretch_time_scale<class_AnimationNodeAnimation_property_stretch_time_scale>` | |
  36. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  37. | :ref:`float<class_float>` | :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` | |
  38. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  39. | :ref:`bool<class_bool>` | :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` | ``false`` |
  40. +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Enumerations
  45. ------------
  46. .. _enum_AnimationNodeAnimation_PlayMode:
  47. .. rst-class:: classref-enumeration
  48. enum **PlayMode**:
  49. .. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_FORWARD** = ``0``
  52. Plays animation in forward direction.
  53. .. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_BACKWARD** = ``1``
  56. Plays animation in backward direction.
  57. .. rst-class:: classref-section-separator
  58. ----
  59. .. rst-class:: classref-descriptions-group
  60. Property Descriptions
  61. ---------------------
  62. .. _class_AnimationNodeAnimation_property_animation:
  63. .. rst-class:: classref-property
  64. :ref:`StringName<class_StringName>` **animation** = ``&""``
  65. .. rst-class:: classref-property-setget
  66. - |void| **set_animation**\ (\ value\: :ref:`StringName<class_StringName>`\ )
  67. - :ref:`StringName<class_StringName>` **get_animation**\ (\ )
  68. Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player<class_AnimationTree_property_anim_player>`.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_AnimationNodeAnimation_property_loop_mode:
  72. .. rst-class:: classref-property
  73. :ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode**
  74. .. rst-class:: classref-property-setget
  75. - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode<enum_Animation_LoopMode>`\ )
  76. - :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode**\ (\ )
  77. 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.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_AnimationNodeAnimation_property_play_mode:
  81. .. rst-class:: classref-property
  82. :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **play_mode** = ``0``
  83. .. rst-class:: classref-property-setget
  84. - |void| **set_play_mode**\ (\ value\: :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>`\ )
  85. - :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **get_play_mode**\ (\ )
  86. Determines the playback direction of the animation.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_AnimationNodeAnimation_property_start_offset:
  90. .. rst-class:: classref-property
  91. :ref:`float<class_float>` **start_offset**
  92. .. rst-class:: classref-property-setget
  93. - |void| **set_start_offset**\ (\ value\: :ref:`float<class_float>`\ )
  94. - :ref:`float<class_float>` **get_start_offset**\ (\ )
  95. If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` is ``true``, offset the start position of the animation.
  96. This is useful for adjusting which foot steps first in 3D walking animations.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_AnimationNodeAnimation_property_stretch_time_scale:
  100. .. rst-class:: classref-property
  101. :ref:`bool<class_bool>` **stretch_time_scale**
  102. .. rst-class:: classref-property-setget
  103. - |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool<class_bool>`\ )
  104. - :ref:`bool<class_bool>` **is_stretching_time_scale**\ (\ )
  105. If ``true``, scales the time so that the length specified in :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` is one cycle.
  106. This is useful for matching the periods of walking and running animations.
  107. 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>`.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_AnimationNodeAnimation_property_timeline_length:
  111. .. rst-class:: classref-property
  112. :ref:`float<class_float>` **timeline_length**
  113. .. rst-class:: classref-property-setget
  114. - |void| **set_timeline_length**\ (\ value\: :ref:`float<class_float>`\ )
  115. - :ref:`float<class_float>` **get_timeline_length**\ (\ )
  116. If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` is ``true``, offset the start position of the animation.
  117. .. rst-class:: classref-item-separator
  118. ----
  119. .. _class_AnimationNodeAnimation_property_use_custom_timeline:
  120. .. rst-class:: classref-property
  121. :ref:`bool<class_bool>` **use_custom_timeline** = ``false``
  122. .. rst-class:: classref-property-setget
  123. - |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool<class_bool>`\ )
  124. - :ref:`bool<class_bool>` **is_using_custom_timeline**\ (\ )
  125. If ``true``, :ref:`AnimationNode<class_AnimationNode>` provides an animation based on the :ref:`Animation<class_Animation>` resource with some parameters adjusted.
  126. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  127. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  128. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  129. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  130. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  131. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  132. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  133. .. |void| replace:: :abbr:`void (No return value.)`