class_animationnodeblendspace1d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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/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. Blends linearly between two of any number of :ref:`AnimationNode<class_AnimationNode>` of any type placed on a virtual axis.
  11. Description
  12. -----------
  13. A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  14. 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>`.
  15. Outputs the linear blend of the two :ref:`AnimationNode<class_AnimationNode>`\ s closest to the node's current value.
  16. 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>`.
  17. Tutorials
  18. ---------
  19. - :doc:`AnimationTree <../tutorials/animation/animation_tree>`
  20. Properties
  21. ----------
  22. +-----------------------------+--------------------------------------------------------------------------+-------------+
  23. | :ref:`float<class_float>` | :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>` | ``1.0`` |
  24. +-----------------------------+--------------------------------------------------------------------------+-------------+
  25. | :ref:`float<class_float>` | :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` | ``-1.0`` |
  26. +-----------------------------+--------------------------------------------------------------------------+-------------+
  27. | :ref:`float<class_float>` | :ref:`snap<class_AnimationNodeBlendSpace1D_property_snap>` | ``0.1`` |
  28. +-----------------------------+--------------------------------------------------------------------------+-------------+
  29. | :ref:`bool<class_bool>` | :ref:`sync<class_AnimationNodeBlendSpace1D_property_sync>` | ``false`` |
  30. +-----------------------------+--------------------------------------------------------------------------+-------------+
  31. | :ref:`String<class_String>` | :ref:`value_label<class_AnimationNodeBlendSpace1D_property_value_label>` | ``"value"`` |
  32. +-----------------------------+--------------------------------------------------------------------------+-------------+
  33. Methods
  34. -------
  35. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | 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 **)** |
  37. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`int<class_int>` | :ref:`get_blend_point_count<class_AnimationNodeBlendSpace1D_method_get_blend_point_count>` **(** **)** |const| |
  39. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`get_blend_point_node<class_AnimationNodeBlendSpace1D_method_get_blend_point_node>` **(** :ref:`int<class_int>` point **)** |const| |
  41. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`float<class_float>` | :ref:`get_blend_point_position<class_AnimationNodeBlendSpace1D_method_get_blend_point_position>` **(** :ref:`int<class_int>` point **)** |const| |
  43. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`remove_blend_point<class_AnimationNodeBlendSpace1D_method_remove_blend_point>` **(** :ref:`int<class_int>` point **)** |
  45. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`set_blend_point_node<class_AnimationNodeBlendSpace1D_method_set_blend_point_node>` **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)** |
  47. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | void | :ref:`set_blend_point_position<class_AnimationNodeBlendSpace1D_method_set_blend_point_position>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)** |
  49. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. Property Descriptions
  51. ---------------------
  52. .. _class_AnimationNodeBlendSpace1D_property_max_space:
  53. - :ref:`float<class_float>` **max_space**
  54. +-----------+----------------------+
  55. | *Default* | ``1.0`` |
  56. +-----------+----------------------+
  57. | *Setter* | set_max_space(value) |
  58. +-----------+----------------------+
  59. | *Getter* | get_max_space() |
  60. +-----------+----------------------+
  61. The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  62. ----
  63. .. _class_AnimationNodeBlendSpace1D_property_min_space:
  64. - :ref:`float<class_float>` **min_space**
  65. +-----------+----------------------+
  66. | *Default* | ``-1.0`` |
  67. +-----------+----------------------+
  68. | *Setter* | set_min_space(value) |
  69. +-----------+----------------------+
  70. | *Getter* | get_min_space() |
  71. +-----------+----------------------+
  72. The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  73. ----
  74. .. _class_AnimationNodeBlendSpace1D_property_snap:
  75. - :ref:`float<class_float>` **snap**
  76. +-----------+-----------------+
  77. | *Default* | ``0.1`` |
  78. +-----------+-----------------+
  79. | *Setter* | set_snap(value) |
  80. +-----------+-----------------+
  81. | *Getter* | get_snap() |
  82. +-----------+-----------------+
  83. Position increment to snap to when moving a point on the axis.
  84. ----
  85. .. _class_AnimationNodeBlendSpace1D_property_sync:
  86. - :ref:`bool<class_bool>` **sync**
  87. +-----------+---------------------+
  88. | *Default* | ``false`` |
  89. +-----------+---------------------+
  90. | *Setter* | set_use_sync(value) |
  91. +-----------+---------------------+
  92. | *Getter* | is_using_sync() |
  93. +-----------+---------------------+
  94. If ``false``, the blended animations' frame are stopped when the blend value is ``0``.
  95. If ``true``, forcing the blended animations to advance frame.
  96. ----
  97. .. _class_AnimationNodeBlendSpace1D_property_value_label:
  98. - :ref:`String<class_String>` **value_label**
  99. +-----------+------------------------+
  100. | *Default* | ``"value"`` |
  101. +-----------+------------------------+
  102. | *Setter* | set_value_label(value) |
  103. +-----------+------------------------+
  104. | *Getter* | get_value_label() |
  105. +-----------+------------------------+
  106. Label of the virtual axis of the blend space.
  107. Method Descriptions
  108. -------------------
  109. .. _class_AnimationNodeBlendSpace1D_method_add_blend_point:
  110. - void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)**
  111. 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.
  112. ----
  113. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count:
  114. - :ref:`int<class_int>` **get_blend_point_count** **(** **)** |const|
  115. Returns the number of points on the blend axis.
  116. ----
  117. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node:
  118. - :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** |const|
  119. Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  120. ----
  121. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position:
  122. - :ref:`float<class_float>` **get_blend_point_position** **(** :ref:`int<class_int>` point **)** |const|
  123. Returns the position of the point at index ``point``.
  124. ----
  125. .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point:
  126. - void **remove_blend_point** **(** :ref:`int<class_int>` point **)**
  127. Removes the point at index ``point`` from the blend axis.
  128. ----
  129. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node:
  130. - void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**
  131. Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  132. ----
  133. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position:
  134. - void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)**
  135. Updates the position of the point at index ``point`` on the blend axis.
  136. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  137. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  138. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  139. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  140. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  141. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`