Class AnimationNodeBlendTree
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class AnimationNodeBlendTree : AnimationRootNode, IDisposable
- Inheritance
-
AnimationNodeBlendTree
- Implements
- Inherited Members
Constructors
AnimationNodeBlendTree()
public AnimationNodeBlendTree()
Fields
ConnectionErrorConnectionExists
The specified connection already exists.
public const long ConnectionErrorConnectionExists = 5
Field Value
ConnectionErrorNoInput
The input node is null
.
public const long ConnectionErrorNoInput = 1
Field Value
ConnectionErrorNoInputIndex
The specified input port is out of range.
public const long ConnectionErrorNoInputIndex = 2
Field Value
ConnectionErrorNoOutput
The output node is null
.
public const long ConnectionErrorNoOutput = 3
Field Value
ConnectionErrorSameNode
Input and output nodes are the same.
public const long ConnectionErrorSameNode = 4
Field Value
ConnectionOk
The connection was successful.
public const long ConnectionOk = 0
Field Value
Properties
GraphOffset
The global offset of all sub animation nodes.
public Vector2 GraphOffset { get; set; }
Property Value
Methods
AddNode(StringName, AnimationNode, Vector2?)
Adds an AnimationNode at the given position
. The name
is used to identify the created sub animation node later.
public void AddNode(StringName name, AnimationNode node, Vector2? position = null)
Parameters
name
StringNamenode
AnimationNodeposition
Vector2?If the parameter is null, then the default value is
new Vector2(0, 0)
.
ConnectNode(StringName, int, StringName)
Connects the output of an AnimationNode as input for another AnimationNode, at the input port specified by inputIndex
.
public void ConnectNode(StringName inputNode, int inputIndex, StringName outputNode)
Parameters
inputNode
StringNameinputIndex
intoutputNode
StringName
DisconnectNode(StringName, int)
Disconnects the animation node connected to the specified input.
public void DisconnectNode(StringName inputNode, int inputIndex)
Parameters
inputNode
StringNameinputIndex
int
GetNode(StringName)
Returns the sub animation node with the specified name
.
public AnimationNode GetNode(StringName name)
Parameters
name
StringName
Returns
GetNodePosition(StringName)
Returns the position of the sub animation node with the specified name
.
public Vector2 GetNodePosition(StringName name)
Parameters
name
StringName
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
HasNode(StringName)
Returns true
if a sub animation node with specified name
exists.
public bool HasNode(StringName name)
Parameters
name
StringName
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
RemoveNode(StringName)
Removes a sub animation node.
public void RemoveNode(StringName name)
Parameters
name
StringName
RenameNode(StringName, StringName)
Changes the name of a sub animation node.
public void RenameNode(StringName name, StringName newName)
Parameters
name
StringNamenewName
StringName
SetNodePosition(StringName, Vector2)
Modifies the position of a sub animation node.
public void SetNodePosition(StringName name, Vector2 position)
Parameters
name
StringNameposition
Vector2
Events
NodeChanged
Emitted when the input port information is changed.
public event AnimationNodeBlendTree.NodeChangedEventHandler NodeChanged