class_animationnodeblendspace1d.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/AnimationNodeBlendSpace1D.xml.
  6. .. _class_AnimationNodeBlendSpace1D:
  7. AnimationNodeBlendSpace1D
  8. =========================
  9. **Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A set of :ref:`AnimationRootNode<class_AnimationRootNode>`\ s placed on a virtual axis, crossfading between the two adjacent ones. Used by :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A resource used by :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  15. \ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode<class_AnimationRootNode>`\ s can be added using :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`. Outputs the linear blend of the two :ref:`AnimationRootNode<class_AnimationRootNode>`\ s adjacent to the current value.
  16. You can set the extents of the axis with :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` and :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>`.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  27. | :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` | :ref:`blend_mode<class_AnimationNodeBlendSpace1D_property_blend_mode>` | ``0`` |
  28. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  29. | :ref:`float<class_float>` | :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>` | ``1.0`` |
  30. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  31. | :ref:`float<class_float>` | :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` | ``-1.0`` |
  32. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  33. | :ref:`float<class_float>` | :ref:`snap<class_AnimationNodeBlendSpace1D_property_snap>` | ``0.1`` |
  34. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  35. | :ref:`bool<class_bool>` | :ref:`sync<class_AnimationNodeBlendSpace1D_property_sync>` | ``false`` |
  36. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  37. | :ref:`String<class_String>` | :ref:`value_label<class_AnimationNodeBlendSpace1D_property_value_label>` | ``"value"`` |
  38. +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+
  39. .. rst-class:: classref-reftable-group
  40. Methods
  41. -------
  42. .. table::
  43. :widths: auto
  44. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>` **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)** |
  46. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_blend_point_count<class_AnimationNodeBlendSpace1D_method_get_blend_point_count>` **(** **)** |const| |
  48. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`get_blend_point_node<class_AnimationNodeBlendSpace1D_method_get_blend_point_node>` **(** :ref:`int<class_int>` point **)** |const| |
  50. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`float<class_float>` | :ref:`get_blend_point_position<class_AnimationNodeBlendSpace1D_method_get_blend_point_position>` **(** :ref:`int<class_int>` point **)** |const| |
  52. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`remove_blend_point<class_AnimationNodeBlendSpace1D_method_remove_blend_point>` **(** :ref:`int<class_int>` point **)** |
  54. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`set_blend_point_node<class_AnimationNodeBlendSpace1D_method_set_blend_point_node>` **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)** |
  56. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`set_blend_point_position<class_AnimationNodeBlendSpace1D_method_set_blend_point_position>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)** |
  58. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. .. rst-class:: classref-section-separator
  60. ----
  61. .. rst-class:: classref-descriptions-group
  62. Enumerations
  63. ------------
  64. .. _enum_AnimationNodeBlendSpace1D_BlendMode:
  65. .. rst-class:: classref-enumeration
  66. enum **BlendMode**:
  67. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_INTERPOLATED:
  68. .. rst-class:: classref-enumeration-constant
  69. :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **BLEND_MODE_INTERPOLATED** = ``0``
  70. The interpolation between animations is linear.
  71. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE:
  72. .. rst-class:: classref-enumeration-constant
  73. :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **BLEND_MODE_DISCRETE** = ``1``
  74. The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.
  75. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE_CARRY:
  76. .. rst-class:: classref-enumeration-constant
  77. :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **BLEND_MODE_DISCRETE_CARRY** = ``2``
  78. Similar to :ref:`BLEND_MODE_DISCRETE<class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE>`, but starts the new animation at the last animation's playback position.
  79. .. rst-class:: classref-section-separator
  80. ----
  81. .. rst-class:: classref-descriptions-group
  82. Property Descriptions
  83. ---------------------
  84. .. _class_AnimationNodeBlendSpace1D_property_blend_mode:
  85. .. rst-class:: classref-property
  86. :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **blend_mode** = ``0``
  87. .. rst-class:: classref-property-setget
  88. - void **set_blend_mode** **(** :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` value **)**
  89. - :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **get_blend_mode** **(** **)**
  90. Controls the interpolation between animations. See :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` constants.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_AnimationNodeBlendSpace1D_property_max_space:
  94. .. rst-class:: classref-property
  95. :ref:`float<class_float>` **max_space** = ``1.0``
  96. .. rst-class:: classref-property-setget
  97. - void **set_max_space** **(** :ref:`float<class_float>` value **)**
  98. - :ref:`float<class_float>` **get_max_space** **(** **)**
  99. The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_AnimationNodeBlendSpace1D_property_min_space:
  103. .. rst-class:: classref-property
  104. :ref:`float<class_float>` **min_space** = ``-1.0``
  105. .. rst-class:: classref-property-setget
  106. - void **set_min_space** **(** :ref:`float<class_float>` value **)**
  107. - :ref:`float<class_float>` **get_min_space** **(** **)**
  108. The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  109. .. rst-class:: classref-item-separator
  110. ----
  111. .. _class_AnimationNodeBlendSpace1D_property_snap:
  112. .. rst-class:: classref-property
  113. :ref:`float<class_float>` **snap** = ``0.1``
  114. .. rst-class:: classref-property-setget
  115. - void **set_snap** **(** :ref:`float<class_float>` value **)**
  116. - :ref:`float<class_float>` **get_snap** **(** **)**
  117. Position increment to snap to when moving a point on the axis.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_AnimationNodeBlendSpace1D_property_sync:
  121. .. rst-class:: classref-property
  122. :ref:`bool<class_bool>` **sync** = ``false``
  123. .. rst-class:: classref-property-setget
  124. - void **set_use_sync** **(** :ref:`bool<class_bool>` value **)**
  125. - :ref:`bool<class_bool>` **is_using_sync** **(** **)**
  126. If ``false``, the blended animations' frame are stopped when the blend value is ``0``.
  127. If ``true``, forcing the blended animations to advance frame.
  128. .. rst-class:: classref-item-separator
  129. ----
  130. .. _class_AnimationNodeBlendSpace1D_property_value_label:
  131. .. rst-class:: classref-property
  132. :ref:`String<class_String>` **value_label** = ``"value"``
  133. .. rst-class:: classref-property-setget
  134. - void **set_value_label** **(** :ref:`String<class_String>` value **)**
  135. - :ref:`String<class_String>` **get_value_label** **(** **)**
  136. Label of the virtual axis of the blend space.
  137. .. rst-class:: classref-section-separator
  138. ----
  139. .. rst-class:: classref-descriptions-group
  140. Method Descriptions
  141. -------------------
  142. .. _class_AnimationNodeBlendSpace1D_method_add_blend_point:
  143. .. rst-class:: classref-method
  144. void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)**
  145. Adds a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count:
  149. .. rst-class:: classref-method
  150. :ref:`int<class_int>` **get_blend_point_count** **(** **)** |const|
  151. Returns the number of points on the blend axis.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node:
  155. .. rst-class:: classref-method
  156. :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** |const|
  157. Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  158. .. rst-class:: classref-item-separator
  159. ----
  160. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position:
  161. .. rst-class:: classref-method
  162. :ref:`float<class_float>` **get_blend_point_position** **(** :ref:`int<class_int>` point **)** |const|
  163. Returns the position of the point at index ``point``.
  164. .. rst-class:: classref-item-separator
  165. ----
  166. .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point:
  167. .. rst-class:: classref-method
  168. void **remove_blend_point** **(** :ref:`int<class_int>` point **)**
  169. Removes the point at index ``point`` from the blend axis.
  170. .. rst-class:: classref-item-separator
  171. ----
  172. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node:
  173. .. rst-class:: classref-method
  174. void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**
  175. Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  176. .. rst-class:: classref-item-separator
  177. ----
  178. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position:
  179. .. rst-class:: classref-method
  180. void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)**
  181. Updates the position of the point at index ``point`` on the blend axis.
  182. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  183. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  184. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  185. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  186. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  187. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  188. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`