class_animationnodeblendspace1d.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimationNodeBlendSpace1D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimationNodeBlendSpace1D:
  6. AnimationNodeBlendSpace1D
  7. =========================
  8. **Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Blends linearly between two of any number of :ref:`AnimationNode<class_AnimationNode>` of any type placed on a virtual axis.
  10. Description
  11. -----------
  12. A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  13. 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>`.
  14. Outputs the linear blend of the two :ref:`AnimationNode<class_AnimationNode>`\ s closest to the node's current value.
  15. 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>`.
  16. Tutorials
  17. ---------
  18. - :doc:`../tutorials/animation/animation_tree`
  19. Properties
  20. ----------
  21. +-----------------------------+--------------------------------------------------------------------------+-------------+
  22. | :ref:`float<class_float>` | :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>` | ``1.0`` |
  23. +-----------------------------+--------------------------------------------------------------------------+-------------+
  24. | :ref:`float<class_float>` | :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` | ``-1.0`` |
  25. +-----------------------------+--------------------------------------------------------------------------+-------------+
  26. | :ref:`float<class_float>` | :ref:`snap<class_AnimationNodeBlendSpace1D_property_snap>` | ``0.1`` |
  27. +-----------------------------+--------------------------------------------------------------------------+-------------+
  28. | :ref:`String<class_String>` | :ref:`value_label<class_AnimationNodeBlendSpace1D_property_value_label>` | ``"value"`` |
  29. +-----------------------------+--------------------------------------------------------------------------+-------------+
  30. Methods
  31. -------
  32. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | 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 **)** |
  34. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`get_blend_point_count<class_AnimationNodeBlendSpace1D_method_get_blend_point_count>` **(** **)** |const| |
  36. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`get_blend_point_node<class_AnimationNodeBlendSpace1D_method_get_blend_point_node>` **(** :ref:`int<class_int>` point **)** |const| |
  38. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`float<class_float>` | :ref:`get_blend_point_position<class_AnimationNodeBlendSpace1D_method_get_blend_point_position>` **(** :ref:`int<class_int>` point **)** |const| |
  40. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`remove_blend_point<class_AnimationNodeBlendSpace1D_method_remove_blend_point>` **(** :ref:`int<class_int>` point **)** |
  42. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`set_blend_point_node<class_AnimationNodeBlendSpace1D_method_set_blend_point_node>` **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)** |
  44. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`set_blend_point_position<class_AnimationNodeBlendSpace1D_method_set_blend_point_position>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)** |
  46. +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. Property Descriptions
  48. ---------------------
  49. .. _class_AnimationNodeBlendSpace1D_property_max_space:
  50. - :ref:`float<class_float>` **max_space**
  51. +-----------+----------------------+
  52. | *Default* | ``1.0`` |
  53. +-----------+----------------------+
  54. | *Setter* | set_max_space(value) |
  55. +-----------+----------------------+
  56. | *Getter* | get_max_space() |
  57. +-----------+----------------------+
  58. The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  59. ----
  60. .. _class_AnimationNodeBlendSpace1D_property_min_space:
  61. - :ref:`float<class_float>` **min_space**
  62. +-----------+----------------------+
  63. | *Default* | ``-1.0`` |
  64. +-----------+----------------------+
  65. | *Setter* | set_min_space(value) |
  66. +-----------+----------------------+
  67. | *Getter* | get_min_space() |
  68. +-----------+----------------------+
  69. The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
  70. ----
  71. .. _class_AnimationNodeBlendSpace1D_property_snap:
  72. - :ref:`float<class_float>` **snap**
  73. +-----------+-----------------+
  74. | *Default* | ``0.1`` |
  75. +-----------+-----------------+
  76. | *Setter* | set_snap(value) |
  77. +-----------+-----------------+
  78. | *Getter* | get_snap() |
  79. +-----------+-----------------+
  80. Position increment to snap to when moving a point on the axis.
  81. ----
  82. .. _class_AnimationNodeBlendSpace1D_property_value_label:
  83. - :ref:`String<class_String>` **value_label**
  84. +-----------+------------------------+
  85. | *Default* | ``"value"`` |
  86. +-----------+------------------------+
  87. | *Setter* | set_value_label(value) |
  88. +-----------+------------------------+
  89. | *Getter* | get_value_label() |
  90. +-----------+------------------------+
  91. Label of the virtual axis of the blend space.
  92. Method Descriptions
  93. -------------------
  94. .. _class_AnimationNodeBlendSpace1D_method_add_blend_point:
  95. - void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)**
  96. 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.
  97. ----
  98. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count:
  99. - :ref:`int<class_int>` **get_blend_point_count** **(** **)** |const|
  100. Returns the number of points on the blend axis.
  101. ----
  102. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node:
  103. - :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** |const|
  104. Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  105. ----
  106. .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position:
  107. - :ref:`float<class_float>` **get_blend_point_position** **(** :ref:`int<class_int>` point **)** |const|
  108. Returns the position of the point at index ``point``.
  109. ----
  110. .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point:
  111. - void **remove_blend_point** **(** :ref:`int<class_int>` point **)**
  112. Removes the point at index ``point`` from the blend axis.
  113. ----
  114. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node:
  115. - void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**
  116. Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.
  117. ----
  118. .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position:
  119. - void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` pos **)**
  120. Updates the position of the point at index ``point`` on the blend axis.
  121. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  122. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  123. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`