mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
179 lines
11 KiB
ReStructuredText
179 lines
11 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the AnimationNodeBlendTree.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_AnimationNodeBlendTree:
|
|
|
|
AnimationNodeBlendTree
|
|
======================
|
|
|
|
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
:ref:`AnimationTree<class_AnimationTree>` node resource that contains many blend type nodes.
|
|
|
|
Description
|
|
-----------
|
|
|
|
This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`AnimationTree <../tutorials/animation/animation_tree>`
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-------------------------------+-------------------------------------------------------------------------+-------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`graph_offset<class_AnimationNodeBlendTree_property_graph_offset>` | ``Vector2(0, 0)`` |
|
|
+-------------------------------+-------------------------------------------------------------------------+-------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_node<class_AnimationNodeBlendTree_method_add_node>` **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationNode<class_AnimationNode>` node, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`connect_node<class_AnimationNodeBlendTree_method_connect_node>` **(** :ref:`StringName<class_StringName>` input_node, :ref:`int<class_int>` input_index, :ref:`StringName<class_StringName>` output_node **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`disconnect_node<class_AnimationNodeBlendTree_method_disconnect_node>` **(** :ref:`StringName<class_StringName>` input_node, :ref:`int<class_int>` input_index **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeBlendTree_method_get_node>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeBlendTree_method_get_node_position>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_node<class_AnimationNodeBlendTree_method_has_node>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_node<class_AnimationNodeBlendTree_method_remove_node>` **(** :ref:`StringName<class_StringName>` name **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rename_node<class_AnimationNodeBlendTree_method_rename_node>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` new_name **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_node_position<class_AnimationNodeBlendTree_method_set_node_position>` **(** :ref:`StringName<class_StringName>` name, :ref:`Vector2<class_Vector2>` position **)** |
|
|
+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Constants
|
|
---------
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_OK:
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT:
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT_INDEX:
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_OUTPUT:
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_SAME_NODE:
|
|
|
|
.. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_CONNECTION_EXISTS:
|
|
|
|
- **CONNECTION_OK** = **0** --- The connection was successful.
|
|
|
|
- **CONNECTION_ERROR_NO_INPUT** = **1** --- The input node is ``null``.
|
|
|
|
- **CONNECTION_ERROR_NO_INPUT_INDEX** = **2** --- The specified input port is out of range.
|
|
|
|
- **CONNECTION_ERROR_NO_OUTPUT** = **3** --- The output node is ``null``.
|
|
|
|
- **CONNECTION_ERROR_SAME_NODE** = **4** --- Input and output nodes are the same.
|
|
|
|
- **CONNECTION_ERROR_CONNECTION_EXISTS** = **5** --- The specified connection already exists.
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_AnimationNodeBlendTree_property_graph_offset:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **graph_offset**
|
|
|
|
+-----------+-------------------------+
|
|
| *Default* | ``Vector2(0, 0)`` |
|
|
+-----------+-------------------------+
|
|
| *Setter* | set_graph_offset(value) |
|
|
+-----------+-------------------------+
|
|
| *Getter* | get_graph_offset() |
|
|
+-----------+-------------------------+
|
|
|
|
The global offset of all sub-nodes.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_AnimationNodeBlendTree_method_add_node:
|
|
|
|
- void **add_node** **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationNode<class_AnimationNode>` node, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)**
|
|
|
|
Adds an :ref:`AnimationNode<class_AnimationNode>` at the given ``position``. The ``name`` is used to identify the created sub-node later.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_connect_node:
|
|
|
|
- void **connect_node** **(** :ref:`StringName<class_StringName>` input_node, :ref:`int<class_int>` input_index, :ref:`StringName<class_StringName>` output_node **)**
|
|
|
|
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``.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_disconnect_node:
|
|
|
|
- void **disconnect_node** **(** :ref:`StringName<class_StringName>` input_node, :ref:`int<class_int>` input_index **)**
|
|
|
|
Disconnects the node connected to the specified input.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_get_node:
|
|
|
|
- :ref:`AnimationNode<class_AnimationNode>` **get_node** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
|
|
|
Returns the sub-node with the specified ``name``.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_get_node_position:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_node_position** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
|
|
|
Returns the position of the sub-node with the specified ``name``.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_has_node:
|
|
|
|
- :ref:`bool<class_bool>` **has_node** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
|
|
|
Returns ``true`` if a sub-node with specified ``name`` exists.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_remove_node:
|
|
|
|
- void **remove_node** **(** :ref:`StringName<class_StringName>` name **)**
|
|
|
|
Removes a sub-node.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_rename_node:
|
|
|
|
- void **rename_node** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` new_name **)**
|
|
|
|
Changes the name of a sub-node.
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeBlendTree_method_set_node_position:
|
|
|
|
- void **set_node_position** **(** :ref:`StringName<class_StringName>` name, :ref:`Vector2<class_Vector2>` position **)**
|
|
|
|
Modifies the position of a sub-node.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|