github_url: | hide |
---|
Inherits: :ref:`AnimationRootNode<class_AnimationRootNode>` < :ref:`AnimationNode<class_AnimationNode>` < :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`
Blends linearly between two of any number of :ref:`AnimationNode<class_AnimationNode>` of any type placed on a virtual axis.
A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
This is a virtual axis on which you can add any type of :ref:`AnimationNode<class_AnimationNode>` using :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
Outputs the linear blend of the two :ref:`AnimationNode<class_AnimationNode>`s closest to the node's current value.
You can set the extents of the axis using the :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` and :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>`.
- :ref:`float<class_float>` max_space
Default | 1.0 |
Setter | set_max_space(value) |
Getter | get_max_space() |
The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
- :ref:`float<class_float>` min_space
Default | -1.0 |
Setter | set_min_space(value) |
Getter | get_min_space() |
The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.
Default | 0.1 |
Setter | set_snap(value) |
Getter | get_snap() |
Position increment to snap to when moving a point on the axis.
- :ref:`String<class_String>` value_label
Default | "value" |
Setter | set_value_label(value) |
Getter | get_value_label() |
Label of the virtual axis of the blend space.
- void add_blend_point ( :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`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.
- :ref:`int<class_int>` get_blend_point_count ( ) const
Returns the number of points on the blend axis.
- :ref:`AnimationRootNode<class_AnimationRootNode>` get_blend_point_node ( :ref:`int<class_int>` point ) const
Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index point
.
- :ref:`float<class_float>` get_blend_point_position ( :ref:`int<class_int>` point ) const
Returns the position of the point at index point
.
- void remove_blend_point ( :ref:`int<class_int>` point )
Removes the point at index point
from the blend axis.
- void set_blend_point_node ( :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node )
Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index point
.
- void set_blend_point_position ( :ref:`int<class_int>` point, :ref:`float<class_float>` pos )
Updates the position of the point at index point
on the blend axis.