:github_url: hide .. _class_AnimationNodeBlendTree: AnimationNodeBlendTree ====================== **Eredita:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Un sottoalbero di molti tipi di :ref:`AnimationNode` usato per animazioni complesse. Usato da :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Descrizione ---------------------- Questo nodo di animazione puรฒ contenere un sottoalbero di qualsiasi altro tipo di nodo di animazione, come :ref:`AnimationNodeTransition`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, ecc. Questa รจ una delle radici dei nodi di animazione piรน comunemente utilizzate. Per impostazione predefinita, viene creato un nodo :ref:`AnimationNodeOutput` denominato ``output``. .. rst-class:: classref-introduction-group Tutorial ---------------- - :doc:`Utilizzare l'AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group Proprietร  ------------------ .. table:: :widths: auto +-------------------------------+-------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`graph_offset` | ``Vector2(0, 0)`` | +-------------------------------+-------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group Metodi ------------ .. table:: :widths: auto +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`connect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`disconnect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_node_list`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_node`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_node`\ (\ name\: :ref:`StringName`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`rename_node`\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_node_position`\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Segnali -------------- .. _class_AnimationNodeBlendTree_signal_node_changed: .. rst-class:: classref-signal **node_changed**\ (\ node_name\: :ref:`StringName`\ ) :ref:`๐Ÿ”—` Emesso quando le informazioni sulla porta di ingresso sono cambiate. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Costanti ---------------- .. _class_AnimationNodeBlendTree_constant_CONNECTION_OK: .. rst-class:: classref-constant **CONNECTION_OK** = ``0`` :ref:`๐Ÿ”—` La connessione ha avuto successo. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT: .. rst-class:: classref-constant **CONNECTION_ERROR_NO_INPUT** = ``1`` :ref:`๐Ÿ”—` Il nodo in ingresso รจ ``null``. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_INPUT_INDEX: .. rst-class:: classref-constant **CONNECTION_ERROR_NO_INPUT_INDEX** = ``2`` :ref:`๐Ÿ”—` La porta di ingresso specificata รจ fuori portata. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_NO_OUTPUT: .. rst-class:: classref-constant **CONNECTION_ERROR_NO_OUTPUT** = ``3`` :ref:`๐Ÿ”—` Il nodo in uscita รจ ``null``. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_SAME_NODE: .. rst-class:: classref-constant **CONNECTION_ERROR_SAME_NODE** = ``4`` :ref:`๐Ÿ”—` I nodi in ingresso e in uscita sono gli stessi. .. _class_AnimationNodeBlendTree_constant_CONNECTION_ERROR_CONNECTION_EXISTS: .. rst-class:: classref-constant **CONNECTION_ERROR_CONNECTION_EXISTS** = ``5`` :ref:`๐Ÿ”—` La connessione specificata esiste giร . .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni delle proprietร  ------------------------------------------------------ .. _class_AnimationNodeBlendTree_property_graph_offset: .. rst-class:: classref-property :ref:`Vector2` **graph_offset** = ``Vector2(0, 0)`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget - |void| **set_graph_offset**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_graph_offset**\ (\ ) Scostamento globale di tutti i nodi di animazione secondari. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni dei metodi -------------------------------------------- .. _class_AnimationNodeBlendTree_method_add_node: .. rst-class:: classref-method |void| **add_node**\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) :ref:`๐Ÿ”—` Aggiunge un :ref:`AnimationNode` alla posizione ``position``. Il nome ``name`` serve per identificare il nodo di animazione secondario creato in seguito. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_connect_node: .. rst-class:: classref-method |void| **connect_node**\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) :ref:`๐Ÿ”—` Collega l'uscita di un :ref:`AnimationNode` all'ingresso per un altro :ref:`AnimationNode`, alla porta di ingresso specificata da ``input_index``. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_disconnect_node: .. rst-class:: classref-method |void| **disconnect_node**\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) :ref:`๐Ÿ”—` Scollega il nodo di animazione connesso all'ingresso specificato. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_get_node: .. rst-class:: classref-method :ref:`AnimationNode` **get_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` Restituisce il nodo di animazione secondario con il nome specificato. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_get_node_list: .. rst-class:: classref-method :ref:`Array`\[:ref:`StringName`\] **get_node_list**\ (\ ) |const| :ref:`๐Ÿ”—` Restituisce una lista contenente i nomi di tutti i nodi di animazione secondari in questo albero di fusione. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_get_node_position: .. rst-class:: classref-method :ref:`Vector2` **get_node_position**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` Restituisce la posizione del nodo di animazione secondario con il nome specificato. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_has_node: .. rst-class:: classref-method :ref:`bool` **has_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` Restituisce ``true`` se esiste un nodo di animazione secondario con il nome specificato. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_remove_node: .. rst-class:: classref-method |void| **remove_node**\ (\ name\: :ref:`StringName`\ ) :ref:`๐Ÿ”—` Rimuove un nodo di animazione secondario. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_rename_node: .. rst-class:: classref-method |void| **rename_node**\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`๐Ÿ”—` Cambia il nome di un nodo di animazione secondario. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendTree_method_set_node_position: .. rst-class:: classref-method |void| **set_node_position**\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) :ref:`๐Ÿ”—` Modifica la posizione di un nodo di animazione secondario. .. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)` .. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)` .. |constructor| replace:: :abbr:`constructor (Questo metodo รจ utilizzato per creare un tipo.)` .. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi puรฒ essere chiamato direttamente usando il nome della classe.)` .. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)` .. |bitfield| replace:: :abbr:`BitField (Questo valore รจ un intero composto da una maschera di bit dei seguenti flag.)` .. |void| replace:: :abbr:`void (Nessun valore restituito.)`