Class AnimationNodeBlendTree
A sub-tree of many type AnimationNodes used for complex animations. Used by AnimationTree.
- Inheritance
-
AnimationNodeBlendTree
Remarks
This animation node may contain a sub-tree of any other type animation nodes, such as AnimationNodeTransition, AnimationNodeBlend2, AnimationNodeBlend3, AnimationNodeOneShot, etc. This is one of the most commonly used animation node roots.
An AnimationNodeOutput node named output
is created by default.
See Also
Fields
CONNECTION_OK
The connection was successful.
const CONNECTION_OK = 0
CONNECTION_ERROR_NO_INPUT
The input node is null
.
const CONNECTION_ERROR_NO_INPUT = 1
CONNECTION_ERROR_NO_INPUT_INDEX
The specified input port is out of range.
const CONNECTION_ERROR_NO_INPUT_INDEX = 2
CONNECTION_ERROR_NO_OUTPUT
The output node is null
.
const CONNECTION_ERROR_NO_OUTPUT = 3
CONNECTION_ERROR_SAME_NODE
Input and output nodes are the same.
const CONNECTION_ERROR_SAME_NODE = 4
CONNECTION_ERROR_CONNECTION_EXISTS
The specified connection already exists.
const CONNECTION_ERROR_CONNECTION_EXISTS = 5
Properties
graph_offset
The global offset of all sub animation nodes.
var graph_offset : Vector2 = Vector2(0, 0)
Property Value
Remarks
Methods
add_node(StringName, AnimationNode, Vector2)
Adds an AnimationNode at the given position
. The name
is used to identify the created sub animation node later.
void add_node(StringName name, AnimationNode node, Vector2 position)
Parameters
name
StringNamenode
AnimationNodeposition
Vector2
connect_node(StringName, int, StringName)
Connects the output of an AnimationNode as input for another AnimationNode, at the input port specified by input_index
.
void connect_node(StringName input_node, int input_index, StringName output_node)
Parameters
input_node
StringNameinput_index
intoutput_node
StringName
disconnect_node(StringName, int)
Disconnects the animation node connected to the specified input.
void disconnect_node(StringName input_node, int input_index)
Parameters
input_node
StringNameinput_index
int
get_node(StringName)
Qualifiers: const
Returns the sub animation node with the specified name
.
AnimationNode get_node(StringName name)
Parameters
name
StringName
get_node_position(StringName)
Qualifiers: const
Returns the position of the sub animation node with the specified name
.
Vector2 get_node_position(StringName name)
Parameters
name
StringName
has_node(StringName)
Qualifiers: const
Returns true
if a sub animation node with specified name
exists.
bool has_node(StringName name)
Parameters
name
StringName
remove_node(StringName)
Removes a sub animation node.
void remove_node(StringName name)
Parameters
name
StringName
rename_node(StringName, StringName)
Changes the name of a sub animation node.
void rename_node(StringName name, StringName new_name)
Parameters
name
StringNamenew_name
StringName
set_node_position(StringName, Vector2)
Modifies the position of a sub animation node.
void set_node_position(StringName name, Vector2 position)
Parameters
name
StringNameposition
Vector2
Events
node_changed(StringName)
Emitted when the input port information is changed.
signal node_changed(StringName node_name)
Parameters
node_name
StringName