AnimationNodeBlendTree
继承: AnimationRootNode
< AnimationNode
< Resource
< RefCounted
< Object
A sub-tree of many type AnimationNode
s used for complex animations. Used by AnimationTree
.
描述
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.
属性
方法
void | add_node ( name: StringName , node: AnimationNode , position: Vector2 = Vector2(0, 0) ) |
void | connect_node ( input_node: StringName , input_index: int , output_node: StringName ) |
void | disconnect_node ( input_node: StringName , input_index: int ) |
AnimationNode | get_node ( name: StringName ) const1 |
Vector2 | get_node_position ( name: StringName ) const1 |
bool | has_node ( name: StringName ) const1 |
void | remove_node ( name: StringName ) |
void | rename_node ( name: StringName , new_name: StringName ) |
void | set_node_position ( name: StringName , position: Vector2 ) |
信号
node_changed ( node_name: StringName
)
Emitted when the input port information is changed.
常量
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.
属性说明
Vector2
graph_offset = Vector2(0, 0)
The global offset of all sub animation nodes.
方法说明
void
add_node ( name: StringName
, node: AnimationNode
, position: Vector2
= Vector2(0, 0) )
Adds an AnimationNode
at the given position
. The name
is used to identify the created sub animation node later.
void
connect_node ( input_node: StringName
, input_index: int
, output_node: StringName
)
Connects the output of an AnimationNode
as input for another AnimationNode
, at the input port specified by input_index
.
void
disconnect_node ( input_node: StringName
, input_index: int
)
Disconnects the animation node connected to the specified input.
AnimationNode
get_node ( name: StringName
) const1
Returns the sub animation node with the specified name
.
Vector2
get_node_position ( name: StringName
) const1
Returns the position of the sub animation node with the specified name
.
bool
has_node ( name: StringName
) const1
Returns true
if a sub animation node with specified name
exists.
void
remove_node ( name: StringName
)
Removes a sub animation node.
void
rename_node ( name: StringName
, new_name: StringName
)
Changes the name of a sub animation node.
void
set_node_position ( name: StringName
, position: Vector2
)
Modifies the position of a sub animation node.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。