Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/doc/classes/AnimationNodeBlendTree.xml
10277 views
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3
<brief_description>
4
A sub-tree of many type [AnimationNode]s used for complex animations. Used by [AnimationTree].
5
</brief_description>
6
<description>
7
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.
8
An [AnimationNodeOutput] node named [code]output[/code] is created by default.
9
</description>
10
<tutorials>
11
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
12
</tutorials>
13
<methods>
14
<method name="add_node">
15
<return type="void" />
16
<param index="0" name="name" type="StringName" />
17
<param index="1" name="node" type="AnimationNode" />
18
<param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
19
<description>
20
Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub animation node later.
21
</description>
22
</method>
23
<method name="connect_node">
24
<return type="void" />
25
<param index="0" name="input_node" type="StringName" />
26
<param index="1" name="input_index" type="int" />
27
<param index="2" name="output_node" type="StringName" />
28
<description>
29
Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index].
30
</description>
31
</method>
32
<method name="disconnect_node">
33
<return type="void" />
34
<param index="0" name="input_node" type="StringName" />
35
<param index="1" name="input_index" type="int" />
36
<description>
37
Disconnects the animation node connected to the specified input.
38
</description>
39
</method>
40
<method name="get_node" qualifiers="const">
41
<return type="AnimationNode" />
42
<param index="0" name="name" type="StringName" />
43
<description>
44
Returns the sub animation node with the specified [param name].
45
</description>
46
</method>
47
<method name="get_node_list" qualifiers="const">
48
<return type="StringName[]" />
49
<description>
50
Returns a list containing the names of all sub animation nodes in this blend tree.
51
</description>
52
</method>
53
<method name="get_node_position" qualifiers="const">
54
<return type="Vector2" />
55
<param index="0" name="name" type="StringName" />
56
<description>
57
Returns the position of the sub animation node with the specified [param name].
58
</description>
59
</method>
60
<method name="has_node" qualifiers="const">
61
<return type="bool" />
62
<param index="0" name="name" type="StringName" />
63
<description>
64
Returns [code]true[/code] if a sub animation node with specified [param name] exists.
65
</description>
66
</method>
67
<method name="remove_node">
68
<return type="void" />
69
<param index="0" name="name" type="StringName" />
70
<description>
71
Removes a sub animation node.
72
</description>
73
</method>
74
<method name="rename_node">
75
<return type="void" />
76
<param index="0" name="name" type="StringName" />
77
<param index="1" name="new_name" type="StringName" />
78
<description>
79
Changes the name of a sub animation node.
80
</description>
81
</method>
82
<method name="set_node_position">
83
<return type="void" />
84
<param index="0" name="name" type="StringName" />
85
<param index="1" name="position" type="Vector2" />
86
<description>
87
Modifies the position of a sub animation node.
88
</description>
89
</method>
90
</methods>
91
<members>
92
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)">
93
The global offset of all sub animation nodes.
94
</member>
95
</members>
96
<signals>
97
<signal name="node_changed">
98
<param index="0" name="node_name" type="StringName" />
99
<description>
100
Emitted when the input port information is changed.
101
</description>
102
</signal>
103
</signals>
104
<constants>
105
<constant name="CONNECTION_OK" value="0">
106
The connection was successful.
107
</constant>
108
<constant name="CONNECTION_ERROR_NO_INPUT" value="1">
109
The input node is [code]null[/code].
110
</constant>
111
<constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2">
112
The specified input port is out of range.
113
</constant>
114
<constant name="CONNECTION_ERROR_NO_OUTPUT" value="3">
115
The output node is [code]null[/code].
116
</constant>
117
<constant name="CONNECTION_ERROR_SAME_NODE" value="4">
118
Input and output nodes are the same.
119
</constant>
120
<constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5">
121
The specified connection already exists.
122
</constant>
123
</constants>
124
</class>
125
126