AnimationNodeBlendSpace1D
A set of AnimationRootNodes placed on a virtual axis, crossfading between the two adjacent ones. Used by AnimationTree.
A set of AnimationRootNodes placed on a virtual axis, crossfading between the two adjacent ones. Used by AnimationTree.
A resource used by AnimationNodeBlendTree.
AnimationNodeBlendSpace1D represents a virtual axis on which any type of AnimationRootNodes can be added using AnimationNodeBlendSpace1D.AddBlendPoint. Outputs the linear blend of the two AnimationRootNodes adjacent to the current value.
You can set the extents of the axis with AnimationNodeBlendSpace1D.MinSpace and AnimationNodeBlendSpace1D.MaxSpace.
Optionally, signals can be used by setting an AnimationNodeObserverBlendSpace through AnimationTree.
var observer = animationTree.Get("parameters/BlendSpace/observer").As<AnimationNodeObserverBlendSpace>();
observer.ClosestPointChanged += OnClosestPointChanged;Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AnimationNodeBlendSpace1DConstructor
public AnimationNodeBlendSpace1D();Properties8
BlendModeProperty
public AnimationNodeBlendSpace1D.BlendModeEnum BlendMode { get; set; }Controls the interpolation between animations.
CyclicLengthProperty
public double CyclicLength { get; set; }Common cycle duration in seconds for SyncMode.CyclicConstant. Set a positive value; it is not a blend weight or each source Animation duration. CyclicMutable computes duration from active clips.
MaxSpaceProperty
public float MaxSpace { get; set; }The blend space's axis's upper limit for the points' position. See AnimationNodeBlendSpace1D.AddBlendPoint.
MinSpaceProperty
public float MinSpace { get; set; }The blend space's axis's lower limit for the points' position. See AnimationNodeBlendSpace1D.AddBlendPoint.
SnapProperty
public float Snap { get; set; }Position increment to snap to when moving a point on the axis.
SyncProperty · Deprecated
public bool Sync { get; set; }If true, sync mode is enabled (equivalent to AnimationNodeBlendSpace1D.SyncModeEnum.Independent). This property is kept for backward compatibility.
SyncModeProperty
public AnimationNodeBlendSpace1D.SyncModeEnum SyncMode { get; set; }Controls point timing: None advances active points; Independent advances all regardless of weight. CyclicMutable synchronizes using weighted active clip lengths; CyclicConstant uses CyclicLength. Cyclic modes require direct AnimationNodeAnimation points.
ValueLabelProperty
public string ValueLabel { get; set; }Label of the virtual axis of the blend space.
Methods28
AddBlendPoint2 overloads
public void AddBlendPoint(AnimationRootNode node, float pos, int atIndex);Adds a new point with name that represents a node on the virtual axis at a given position set by pos. You can insert it at a specific index using the at_index argument. If you use the default value for at_index, the point is inserted at the end of the blend points array.
Note: If no name is provided, safe index is used as reference. In the future, empty names will be deprecated, so explicitly passing a name is recommended.
| Name | Type | Default |
|---|---|---|
node | AnimationRootNode | — |
pos | float | — |
atIndex | int | — |
public void AddBlendPoint(AnimationRootNode node, float pos, int atIndex = -1, StringName name = null);Adds a new point with name that represents a node on the virtual axis at a given position set by pos. You can insert it at a specific index using the at_index argument. If you use the default value for at_index, the point is inserted at the end of the blend points array.
Note: If no name is provided, safe index is used as reference. In the future, empty names will be deprecated, so explicitly passing a name is recommended.
| Name | Type | Default |
|---|---|---|
node | AnimationRootNode | — |
pos | float | — |
atIndex | int | -1 |
name | StringName | null |
FindBlendPointByNameint
public int FindBlendPointByName(StringName name);Returns the index of the blend point with the given name. Returns -1 if no blend point with that name is found.
| Name | Type | Default |
|---|---|---|
name | StringName | — |
intGetBlendModeAnimationNodeBlendSpace1D.BlendModeEnum
public AnimationNodeBlendSpace1D.BlendModeEnum GetBlendMode();AnimationNodeBlendSpace1D.BlendModeEnumGetBlendPointCountint
public int GetBlendPointCount();Returns the number of points on the blend axis.
intGetBlendPointNameStringName
public StringName GetBlendPointName(int point);Returns the name of the blend point at index point.
| Name | Type | Default |
|---|---|---|
point | int | — |
StringNameGetBlendPointNodeAnimationRootNode
public AnimationRootNode GetBlendPointNode(int point);Returns the AnimationNode referenced by the point at index point.
| Name | Type | Default |
|---|---|---|
point | int | — |
AnimationRootNodeGetBlendPointPositionfloat
public float GetBlendPointPosition(int point);Returns the position of the point at index point.
| Name | Type | Default |
|---|---|---|
point | int | — |
floatGetCyclicLengthdouble
public double GetCyclicLength();doubleGetMaxSpacefloat
public float GetMaxSpace();floatGetMinSpacefloat
public float GetMinSpace();floatGetSnapfloat
public float GetSnap();floatGetSyncModeAnimationNodeBlendSpace1D.SyncModeEnum
public AnimationNodeBlendSpace1D.SyncModeEnum GetSyncMode();AnimationNodeBlendSpace1D.SyncModeEnumGetValueLabelstring
public string GetValueLabel();stringIsUsingSyncbool
public bool IsUsingSync();boolRemoveBlendPointvoid
public void RemoveBlendPoint(int point);Removes the point at index point from the blend axis.
| Name | Type | Default |
|---|---|---|
point | int | — |
ReorderBlendPointvoid
public void ReorderBlendPoint(int fromIndex, int toIndex);Swaps the blend points at indices from_index and to_index, exchanging their positions and properties.
| Name | Type | Default |
|---|---|---|
fromIndex | int | — |
toIndex | int | — |
SetBlendModevoid
public void SetBlendMode(AnimationNodeBlendSpace1D.BlendModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | AnimationNodeBlendSpace1D.BlendModeEnum | — |
SetBlendPointNamevoid
public void SetBlendPointName(int point, StringName name);Sets the name of the blend point at index point. If the name conflicts with an existing point, a unique name will be generated automatically.
| Name | Type | Default |
|---|---|---|
point | int | — |
name | StringName | — |
SetBlendPointNodevoid
public void SetBlendPointNode(int point, AnimationRootNode node);Changes the AnimationNode referenced by the point at index point.
| Name | Type | Default |
|---|---|---|
point | int | — |
node | AnimationRootNode | — |
SetBlendPointPositionvoid
public void SetBlendPointPosition(int point, float pos);Updates the position of the point at index point on the blend axis.
| Name | Type | Default |
|---|---|---|
point | int | — |
pos | float | — |
SetCyclicLengthvoid
public void SetCyclicLength(double length);| Name | Type | Default |
|---|---|---|
length | double | — |
SetMaxSpacevoid
public void SetMaxSpace(float maxSpace);| Name | Type | Default |
|---|---|---|
maxSpace | float | — |
SetMinSpacevoid
public void SetMinSpace(float minSpace);| Name | Type | Default |
|---|---|---|
minSpace | float | — |
SetSnapvoid
public void SetSnap(float snap);| Name | Type | Default |
|---|---|---|
snap | float | — |
SetSyncModevoid
public void SetSyncMode(AnimationNodeBlendSpace1D.SyncModeEnum syncMode);| Name | Type | Default |
|---|---|---|
syncMode | AnimationNodeBlendSpace1D.SyncModeEnum | — |
SetUseSyncvoid
public void SetUseSync(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetValueLabelvoid
public void SetValueLabel(string text);| Name | Type | Default |
|---|---|---|
text | string | — |
AnimationNodeBlendSpace1D.BlendModeEnum
| Value | Description |
|---|---|
Discrete = 1 | The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. |
DiscreteCarry = 2 | Similar to |
Interpolated = 0 | The interpolation between animations is linear. |
AnimationNodeBlendSpace1D.SyncModeEnum
| Value | Description |
|---|---|
CyclicConstant = 3 | All animations are time-scaled so they complete one cycle in |
CyclicMutable = 2 | All animations are time-scaled so they stay in sync, with the cycle length dynamically computed from active blend weights. This is self-normalizing: a solo animation plays at normal speed.
Note: If you apply |
Independent = 1 | Inactive animations advance with a weight of |
None = 0 | Inactive animations are frozen and do not advance. |