Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AnimationNodeBlendTree¶
Inherits: AnimationRootNode < AnimationNode < Resource < RefCounted < Object
用于复杂动画的许多类型 AnimationNode 的子树。由 AnimationTree 使用。
Description¶
这个动画节点可以包含任何其他类型动画节点的子树,例如 AnimationNodeTransition、AnimationNodeBlend2、AnimationNodeBlend3、AnimationNodeOneShot 等。这是最常用的动画节点根之一。
默认会创建一个名为 output
的 AnimationNodeOutput 节点。
Tutorials¶
Properties¶
|
Methods¶
void |
add_node ( StringName name, AnimationNode node, Vector2 position=Vector2(0, 0) ) |
void |
connect_node ( StringName input_node, int input_index, StringName output_node ) |
void |
disconnect_node ( StringName input_node, int input_index ) |
get_node ( StringName name ) const |
|
get_node_position ( StringName name ) const |
|
has_node ( StringName name ) const |
|
void |
remove_node ( StringName name ) |
void |
rename_node ( StringName name, StringName new_name ) |
void |
set_node_position ( StringName name, Vector2 position ) |
Signals¶
node_changed ( StringName node_name )
当输入端口信息发生更改时发出。
Constants¶
CONNECTION_OK = 0
连接成功。
CONNECTION_ERROR_NO_INPUT = 1
输入节点为 null
。
CONNECTION_ERROR_NO_INPUT_INDEX = 2
指定的输入端口超出范围。
CONNECTION_ERROR_NO_OUTPUT = 3
输出节点为 null
。
CONNECTION_ERROR_SAME_NODE = 4
输入和输出节点相同。
CONNECTION_ERROR_CONNECTION_EXISTS = 5
指定的连接已经存在。
Property Descriptions¶
Vector2 graph_offset = Vector2(0, 0)
所有子动画节点的全局偏移量。
Method Descriptions¶
void add_node ( StringName name, AnimationNode node, Vector2 position=Vector2(0, 0) )
在给定的位置 position
添加一个 AnimationNode。name
用于后续识别该创建的子动画节点。
void connect_node ( StringName input_node, int input_index, StringName output_node )
连接一个 AnimationNode 的输出作为另一个 AnimationNode 的输入,连接在 input_index
指定的输入端口。
void disconnect_node ( StringName input_node, int input_index )
断开连接到指定输入端的动画节点。
AnimationNode get_node ( StringName name ) const
返回名称为 name
的子动画节点。
Vector2 get_node_position ( StringName name ) const
返回名称为 name
的子动画节点的位置。
bool has_node ( StringName name ) const
如果存在名称为 name
的动画子节点,则返回 true
。
void remove_node ( StringName name )
移除一个子动画节点。
void rename_node ( StringName name, StringName new_name )
更改子动画节点的名称。
void set_node_position ( StringName name, Vector2 position )
修改子动画节点的位置。