class_animationnodeblendspace1d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/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:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Blends linearly between two of any number of :ref:`AnimationNode<class_AnimationNode>` of any type placed on a virtual axis.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  15. This is a virtual axis on which you can add any type of :ref:`AnimationNode<class_AnimationNode>` using :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  16. Outputs the linear blend of the two :ref:`AnimationNode<class_AnimationNode>`\ s closest to the node's current value.
  17. You can set the extents of the axis using the :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` and :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>`.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`../tutorials/animation/animation_tree`
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +-----------------------------+--------------------------------------------------------------------------+-------------+
  28. | :ref:`float<class_float>` | :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>` | ``1.0`` |
  29. +-----------------------------+--------------------------------------------------------------------------+-------------+
  30. | :ref:`float<class_float>` | :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` | ``-1.0`` |
  31. +-----------------------------+--------------------------------------------------------------------------+-------------+
  32. | :ref:`float<class_float>` | :ref:`snap<class_AnimationNodeBlendSpace1D_property_snap>` | ``0.1`` |
  33. +-----------------------------+--------------------------------------------------------------------------+-------------+
  34. | :ref:`String<class_String>` | :ref:`value_label<class_AnimationNodeBlendSpace1D_property_value_label>` | ``"value"`` |
  35. +-----------------------------+--------------------------------------------------------------------------+-------------+
  36. .. rst-class:: classref-reftable-group
  37. Methods
  38. -------
  39. .. table::
  40. :widths: auto
  41. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | 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 **)** |
  43. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`int<class_int>` | :ref:`get_blend_point_count<class_AnimationNodeBlendSpace1D_method_get_blend_point_count>` **(** **)** |const| |
  45. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`get_blend_point_node<class_AnimationNodeBlendSpace1D_method_get_blend_point_node>` **(** :ref:`int<class_int>` point **)** |const| |
  47. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`get_blend_point_position<class_AnimationNodeBlendSpace1D_method_get_blend_point_position>` **(** :ref:`int<class_int>` point **)** |const| |
  49. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`remove_blend_point<class_AnimationNodeBlendSpace1D_method_remove_blend_point>` **(** :ref:`int<class_int>` point **)** |
  51. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`set_blend_point_node<class_AnimationNodeBlendSpace1D_method_set_blend_point_node>` **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)** |
  53. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`set_blend_point_position<class_AnimationNodeBlendSpace1D_method_set_blend_point_position>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)** |
  55. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. .. rst-class:: classref-section-separator
  57. ----
  58. .. rst-class:: classref-descriptions-group
  59. Property Descriptions
  60. ---------------------
  61. .. _class_AnimationNodeBlendSpace1D_property_max_space:
  62. .. rst-class:: classref-property
  63. :ref:`float<class_float>` **max_space** = ``1.0``
  64. .. rst-class:: classref-property-setget
  65. - void **set_max_space** **(** :ref:`float<class_float>` value **)**
  66. - :ref:`float<class_float>` **get_max_space** **(** **)**
  67. The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_AnimationNodeBlendSpace1D_property_min_space:
  71. .. rst-class:: classref-property
  72. :ref:`float<class_float>` **min_space** = ``-1.0``
  73. .. rst-class:: classref-property-setget
  74. - void **set_min_space** **(** :ref:`float<class_float>` value **)**
  75. - :ref:`float<class_float>` **get_min_space** **(** **)**
  76. The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_AnimationNodeBlendSpace1D_property_snap:
  80. .. rst-class:: classref-property
  81. :ref:`float<class_float>` **snap** = ``0.1``
  82. .. rst-class:: classref-property-setget
  83. - void **set_snap** **(** :ref:`float<class_float>` value **)**
  84. - :ref:`float<class_float>` **get_snap** **(** **)**
  85. Position increment to snap to when moving a point on the axis.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_AnimationNodeBlendSpace1D_property_value_label:
  89. .. rst-class:: classref-property
  90. :ref:`String<class_String>` **value_label** = ``"value"``
  91. .. rst-class:: classref-property-setget
  92. - void **set_value_label** **(** :ref:`String<class_String>` value **)**
  93. - :ref:`String<class_String>` **get_value_label** **(** **)**
  94. Label of the virtual axis of the blend space.
  95. .. rst-class:: classref-section-separator
  96. ----
  97. .. rst-class:: classref-descriptions-group
  98. Method Descriptions
  99. -------------------
  100. .. _class_AnimationNodeBlendSpace1D_method_add_blend_point:
  101. .. rst-class:: classref-method
  102. void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)**
  103. 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.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count:
  107. .. rst-class:: classref-method
  108. :ref:`int<class_int>` **get_blend_point_count** **(** **)** |const|
  109. Returns the number of points on the blend axis.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node:
  113. .. rst-class:: classref-method
  114. :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** |const|
  115. Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  116. .. rst-class:: classref-item-separator
  117. ----
  118. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position:
  119. .. rst-class:: classref-method
  120. :ref:`float<class_float>` **get_blend_point_position** **(** :ref:`int<class_int>` point **)** |const|
  121. Returns the position of the point at index ``point``.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point:
  125. .. rst-class:: classref-method
  126. void **remove_blend_point** **(** :ref:`int<class_int>` point **)**
  127. Removes the point at index ``point`` from the blend axis.
  128. .. rst-class:: classref-item-separator
  129. ----
  130. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node:
  131. .. rst-class:: classref-method
  132. void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**
  133. Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position:
  137. .. rst-class:: classref-method
  138. void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)**
  139. Updates the position of the point at index ``point`` on the blend axis.
  140. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  141. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  142. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  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.)`