class_animationnodeblendtree.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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/AnimationNodeBlendTree.xml.
  6. .. _class_AnimationNodeBlendTree:
  7. AnimationNodeBlendTree
  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 sub-tree of many type :ref:`AnimationNode<class_AnimationNode>`\ s used for complex animations. Used by :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This animation node may contain a sub-tree of any other type animation nodes, such as :ref:`AnimationNodeTransition<class_AnimationNodeTransition>`, :ref:`AnimationNodeBlend2<class_AnimationNodeBlend2>`, :ref:`AnimationNodeBlend3<class_AnimationNodeBlend3>`, :ref:`AnimationNodeOneShot<class_AnimationNodeOneShot>`, etc. This is one of the most commonly used animation node roots.
  15. An :ref:`AnimationNodeOutput<class_AnimationNodeOutput>` node named ``output`` is created by default.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------+-------------------------------------------------------------------------+-------------------+
  26. | :ref:`Vector2<class_Vector2>` | :ref:`graph_offset<class_AnimationNodeBlendTree_property_graph_offset>` | ``Vector2(0, 0)`` |
  27. +-------------------------------+-------------------------------------------------------------------------+-------------------+
  28. .. rst-class:: classref-reftable-group
  29. Methods
  30. -------
  31. .. table::
  32. :widths: auto
  33. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`add_node<class_AnimationNodeBlendTree_method_add_node>`\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
  35. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`connect_node<class_AnimationNodeBlendTree_method_connect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`, output_node\: :ref:`StringName<class_StringName>`\ ) |
  37. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`disconnect_node<class_AnimationNodeBlendTree_method_disconnect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`\ ) |
  39. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeBlendTree_method_get_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  41. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_node_list<class_AnimationNodeBlendTree_method_get_node_list>`\ (\ ) |const| |
  43. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeBlendTree_method_get_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  45. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`has_node<class_AnimationNodeBlendTree_method_has_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  47. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | |void| | :ref:`remove_node<class_AnimationNodeBlendTree_method_remove_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  49. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`rename_node<class_AnimationNodeBlendTree_method_rename_node>`\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) |
  51. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`set_node_position<class_AnimationNodeBlendTree_method_set_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) |
  53. +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. .. rst-class:: classref-section-separator
  55. ----
  56. .. rst-class:: classref-descriptions-group
  57. Signals
  58. -------
  59. .. _class_AnimationNodeBlendTree_signal_node_changed:
  60. .. rst-class:: classref-signal
  61. **node_changed**\ (\ node_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_signal_node_changed>`
  62. Emitted when the input port information is changed.
  63. .. rst-class:: classref-section-separator
  64. ----
  65. .. rst-class:: classref-descriptions-group
  66. Constants
  67. ---------
  68. .. _class_AnimationNodeBlendTree_constant_CONNECTION_OK:
  69. .. rst-class:: classref-constant
  70. **CONNECTION_OK** = ``0`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_OK>`
  71. The connection was successful.
  72. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT:
  73. .. rst-class:: classref-constant
  74. **CONNECTION_ERROR_NO_INPUT** = ``1`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT>`
  75. The input node is ``null``.
  76. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT_INDEX:
  77. .. rst-class:: classref-constant
  78. **CONNECTION_ERROR_NO_INPUT_INDEX** = ``2`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT_INDEX>`
  79. The specified input port is out of range.
  80. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_OUTPUT:
  81. .. rst-class:: classref-constant
  82. **CONNECTION_ERROR_NO_OUTPUT** = ``3`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_OUTPUT>`
  83. The output node is ``null``.
  84. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_SAME_NODE:
  85. .. rst-class:: classref-constant
  86. **CONNECTION_ERROR_SAME_NODE** = ``4`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_SAME_NODE>`
  87. Input and output nodes are the same.
  88. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_CONNECTION_EXISTS:
  89. .. rst-class:: classref-constant
  90. **CONNECTION_ERROR_CONNECTION_EXISTS** = ``5`` :ref:`🔗<class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_CONNECTION_EXISTS>`
  91. The specified connection already exists.
  92. .. rst-class:: classref-section-separator
  93. ----
  94. .. rst-class:: classref-descriptions-group
  95. Property Descriptions
  96. ---------------------
  97. .. _class_AnimationNodeBlendTree_property_graph_offset:
  98. .. rst-class:: classref-property
  99. :ref:`Vector2<class_Vector2>` **graph_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_AnimationNodeBlendTree_property_graph_offset>`
  100. .. rst-class:: classref-property-setget
  101. - |void| **set_graph_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  102. - :ref:`Vector2<class_Vector2>` **get_graph_offset**\ (\ )
  103. The global offset of all sub animation nodes.
  104. .. rst-class:: classref-section-separator
  105. ----
  106. .. rst-class:: classref-descriptions-group
  107. Method Descriptions
  108. -------------------
  109. .. _class_AnimationNodeBlendTree_method_add_node:
  110. .. rst-class:: classref-method
  111. |void| **add_node**\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_add_node>`
  112. Adds an :ref:`AnimationNode<class_AnimationNode>` at the given ``position``. The ``name`` is used to identify the created sub animation node later.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_AnimationNodeBlendTree_method_connect_node:
  116. .. rst-class:: classref-method
  117. |void| **connect_node**\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`, output_node\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_connect_node>`
  118. Connects the output of an :ref:`AnimationNode<class_AnimationNode>` as input for another :ref:`AnimationNode<class_AnimationNode>`, at the input port specified by ``input_index``.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_AnimationNodeBlendTree_method_disconnect_node:
  122. .. rst-class:: classref-method
  123. |void| **disconnect_node**\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_disconnect_node>`
  124. Disconnects the animation node connected to the specified input.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_AnimationNodeBlendTree_method_get_node:
  128. .. rst-class:: classref-method
  129. :ref:`AnimationNode<class_AnimationNode>` **get_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeBlendTree_method_get_node>`
  130. Returns the sub animation node with the specified ``name``.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_AnimationNodeBlendTree_method_get_node_list:
  134. .. rst-class:: classref-method
  135. :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_node_list**\ (\ ) |const| :ref:`🔗<class_AnimationNodeBlendTree_method_get_node_list>`
  136. Returns a list containing the names of all sub animation nodes in this blend tree.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_AnimationNodeBlendTree_method_get_node_position:
  140. .. rst-class:: classref-method
  141. :ref:`Vector2<class_Vector2>` **get_node_position**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeBlendTree_method_get_node_position>`
  142. Returns the position of the sub animation node with the specified ``name``.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_AnimationNodeBlendTree_method_has_node:
  146. .. rst-class:: classref-method
  147. :ref:`bool<class_bool>` **has_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeBlendTree_method_has_node>`
  148. Returns ``true`` if a sub animation node with specified ``name`` exists.
  149. .. rst-class:: classref-item-separator
  150. ----
  151. .. _class_AnimationNodeBlendTree_method_remove_node:
  152. .. rst-class:: classref-method
  153. |void| **remove_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_remove_node>`
  154. Removes a sub animation node.
  155. .. rst-class:: classref-item-separator
  156. ----
  157. .. _class_AnimationNodeBlendTree_method_rename_node:
  158. .. rst-class:: classref-method
  159. |void| **rename_node**\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_rename_node>`
  160. Changes the name of a sub animation node.
  161. .. rst-class:: classref-item-separator
  162. ----
  163. .. _class_AnimationNodeBlendTree_method_set_node_position:
  164. .. rst-class:: classref-method
  165. |void| **set_node_position**\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_AnimationNodeBlendTree_method_set_node_position>`
  166. Modifies the position of a sub animation node.
  167. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  168. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  169. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  170. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  171. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  172. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  173. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  174. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  175. .. |void| replace:: :abbr:`void (No return value.)`