- github_url
hide
Inherits: AnimationRootNode<class_AnimationRootNode>
< AnimationNode<class_AnimationNode>
< Resource<class_Resource>
< RefCounted<class_RefCounted>
< Object<class_Object>
A set of AnimationRootNode<class_AnimationRootNode>
s placed on a virtual axis, crossfading between the two adjacent ones. Used by AnimationTree<class_AnimationTree>
.
classref-introduction-group
A resource used by AnimationNodeBlendTree<class_AnimationNodeBlendTree>
.
AnimationNodeBlendSpace1D represents a virtual axis on which any type of AnimationRootNode<class_AnimationRootNode>
s can be added using add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>
. Outputs the linear blend of the two AnimationRootNode<class_AnimationRootNode>
s adjacent to the current value.
You can set the extents of the axis with min_space<class_AnimationNodeBlendSpace1D_property_min_space>
and max_space<class_AnimationNodeBlendSpace1D_property_max_space>
.
classref-introduction-group
Using AnimationTree <../tutorials/animation/animation_tree>
classref-reftable-group
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode> |
blend_mode<class_AnimationNodeBlendSpace1D_property_blend_mode> |
0 |
float<class_float> |
max_space<class_AnimationNodeBlendSpace1D_property_max_space> |
1.0 |
float<class_float> |
min_space<class_AnimationNodeBlendSpace1D_property_min_space> |
-1.0 |
float<class_float> |
snap<class_AnimationNodeBlendSpace1D_property_snap> |
0.1 |
bool<class_bool> |
sync<class_AnimationNodeBlendSpace1D_property_sync> |
false |
String<class_String> |
value_label<class_AnimationNodeBlendSpace1D_property_value_label> |
"value" |
classref-reftable-group
void | add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point> ( AnimationRootNode<class_AnimationRootNode> node, float<class_float> pos, int<class_int> at_index=-1 ) |
int<class_int> |
get_blend_point_count<class_AnimationNodeBlendSpace1D_method_get_blend_point_count> ( ) const (This method has no side effects. It doesn't modify any of the instance's member variables.) |
AnimationRootNode<class_AnimationRootNode> |
get_blend_point_node<class_AnimationNodeBlendSpace1D_method_get_blend_point_node> ( int<class_int> point ) const (This method has no side effects. It doesn't modify any of the instance's member variables.) |
float<class_float> |
get_blend_point_position<class_AnimationNodeBlendSpace1D_method_get_blend_point_position> ( int<class_int> point ) const (This method has no side effects. It doesn't modify any of the instance's member variables.) |
void | remove_blend_point<class_AnimationNodeBlendSpace1D_method_remove_blend_point> ( int<class_int> point ) |
void | set_blend_point_node<class_AnimationNodeBlendSpace1D_method_set_blend_point_node> ( int<class_int> point, AnimationRootNode<class_AnimationRootNode> node ) |
void | set_blend_point_position<class_AnimationNodeBlendSpace1D_method_set_blend_point_position> ( int<class_int> point, float<class_float> pos ) |
classref-section-separator
classref-descriptions-group
classref-enumeration
enum BlendMode:
classref-enumeration-constant
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
BLEND_MODE_INTERPOLATED = 0
The interpolation between animations is linear.
classref-enumeration-constant
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
BLEND_MODE_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.
classref-enumeration-constant
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
BLEND_MODE_DISCRETE_CARRY = 2
Similar to BLEND_MODE_DISCRETE<class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE>
, but starts the new animation at the last animation's playback position.
classref-section-separator
classref-descriptions-group
classref-property
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
blend_mode = 0
classref-property-setget
- void set_blend_mode (
BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
value ) BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
get_blend_mode ( )
Controls the interpolation between animations. See BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>
constants.
classref-item-separator
classref-property
float<class_float>
max_space = 1.0
classref-property-setget
- void set_max_space (
float<class_float>
value ) float<class_float>
get_max_space ( )
The blend space's axis's upper limit for the points' position. See add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>
.
classref-item-separator
classref-property
float<class_float>
min_space = -1.0
classref-property-setget
- void set_min_space (
float<class_float>
value ) float<class_float>
get_min_space ( )
The blend space's axis's lower limit for the points' position. See add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>
.
classref-item-separator
classref-property
float<class_float>
snap = 0.1
classref-property-setget
- void set_snap (
float<class_float>
value ) float<class_float>
get_snap ( )
Position increment to snap to when moving a point on the axis.
classref-item-separator
classref-property
bool<class_bool>
sync = false
classref-property-setget
- void set_use_sync (
bool<class_bool>
value ) bool<class_bool>
is_using_sync ( )
If false
, the blended animations' frame are stopped when the blend value is 0
.
If true
, forcing the blended animations to advance frame.
classref-item-separator
classref-property
String<class_String>
value_label = "value"
classref-property-setget
- void set_value_label (
String<class_String>
value ) String<class_String>
get_value_label ( )
Label of the virtual axis of the blend space.
classref-section-separator
classref-descriptions-group
classref-method
void add_blend_point ( AnimationRootNode<class_AnimationRootNode>
node, float<class_float>
pos, int<class_int>
at_index=-1 )
Adds a new point 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.
classref-item-separator
classref-method
int<class_int>
get_blend_point_count ( ) const (This method has no side effects. It doesn't modify any of the instance's member variables.)
Returns the number of points on the blend axis.
classref-item-separator
classref-method
AnimationRootNode<class_AnimationRootNode>
get_blend_point_node ( int<class_int>
point ) const (This method has no side effects. It doesn't modify any of the instance's member variables.)
Returns the AnimationNode<class_AnimationNode>
referenced by the point at index point
.
classref-item-separator
classref-method
float<class_float>
get_blend_point_position ( int<class_int>
point ) const (This method has no side effects. It doesn't modify any of the instance's member variables.)
Returns the position of the point at index point
.
classref-item-separator
classref-method
void remove_blend_point ( int<class_int>
point )
Removes the point at index point
from the blend axis.
classref-item-separator
classref-method
void set_blend_point_node ( int<class_int>
point, AnimationRootNode<class_AnimationRootNode>
node )
Changes the AnimationNode<class_AnimationNode>
referenced by the point at index point
.
classref-item-separator
classref-method
void set_blend_point_position ( int<class_int>
point, float<class_float>
pos )
Updates the position of the point at index point
on the blend axis.