Table of Contents

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

long

ConnectionErrorNoInput

The input node is null.

public const long ConnectionErrorNoInput = 1

Field Value

long

ConnectionErrorNoInputIndex

The specified input port is out of range.

public const long ConnectionErrorNoInputIndex = 2

Field Value

long

ConnectionErrorNoOutput

The output node is null.

public const long ConnectionErrorNoOutput = 3

Field Value

long

ConnectionErrorSameNode

Input and output nodes are the same.

public const long ConnectionErrorSameNode = 4

Field Value

long

ConnectionOk

The connection was successful.

public const long ConnectionOk = 0

Field Value

long

Properties

GraphOffset

The global offset of all sub animation nodes.

public Vector2 GraphOffset { get; set; }

Property Value

Vector2

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 StringName
node AnimationNode
position 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 StringName
inputIndex int
outputNode StringName

DisconnectNode(StringName, int)

Disconnects the animation node connected to the specified input.

public void DisconnectNode(StringName inputNode, int inputIndex)

Parameters

inputNode StringName
inputIndex int

GetNode(StringName)

Returns the sub animation node with the specified name.

public AnimationNode GetNode(StringName name)

Parameters

name StringName

Returns

AnimationNode

GetNodePosition(StringName)

Returns the position of the sub animation node with the specified name.

public Vector2 GetNodePosition(StringName name)

Parameters

name StringName

Returns

Vector2

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_name

Name of the method to check for.

Returns

bool

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_name

Name of the signal to check for.

Returns

bool

HasNode(StringName)

Returns true if a sub animation node with specified name exists.

public bool HasNode(StringName name)

Parameters

name StringName

Returns

bool

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_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

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 StringName
newName StringName

SetNodePosition(StringName, Vector2)

Modifies the position of a sub animation node.

public void SetNodePosition(StringName name, Vector2 position)

Parameters

name StringName
position Vector2

Events

NodeChanged

Emitted when the input port information is changed.

public event AnimationNodeBlendTree.NodeChangedEventHandler NodeChanged

Event Type

AnimationNodeBlendTree.NodeChangedEventHandler