:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeBlendSpace1D.xml. .. _class_AnimationNodeBlendSpace1D: AnimationNodeBlendSpace1D ========================= **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A set of :ref:`AnimationRootNode`\ s placed on a virtual axis, crossfading between the two adjacent ones. Used by :ref:`AnimationTree`. .. rst-class:: classref-introduction-group Description ----------- A resource used by :ref:`AnimationNodeBlendTree`. \ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode`\ s can be added using :ref:`add_blend_point()`. Outputs the linear blend of the two :ref:`AnimationRootNode`\ s adjacent to the current value. You can set the extents of the axis with :ref:`min_space` and :ref:`max_space`. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`BlendMode` | :ref:`blend_mode` | ``0`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`max_space` | ``1.0`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`min_space` | ``-1.0`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`snap` | ``0.1`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`bool` | :ref:`sync` | ``false`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`String` | :ref:`value_label` | ``"value"`` | +------------------------------------------------------------+--------------------------------------------------------------------------+-------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_blend_point`\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`float`, at_index\: :ref:`int` = -1\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_blend_point_count`\ (\ ) |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationRootNode` | :ref:`get_blend_point_node`\ (\ point\: :ref:`int`\ ) |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_blend_point_position`\ (\ point\: :ref:`int`\ ) |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_blend_point`\ (\ point\: :ref:`int`\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_blend_point_node`\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_blend_point_position`\ (\ point\: :ref:`int`, pos\: :ref:`float`\ ) | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationNodeBlendSpace1D_BlendMode: .. rst-class:: classref-enumeration enum **BlendMode**: :ref:`🔗` .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_INTERPOLATED: .. rst-class:: classref-enumeration-constant :ref:`BlendMode` **BLEND_MODE_INTERPOLATED** = ``0`` The interpolation between animations is linear. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE: .. rst-class:: classref-enumeration-constant :ref:`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. .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_DISCRETE_CARRY: .. rst-class:: classref-enumeration-constant :ref:`BlendMode` **BLEND_MODE_DISCRETE_CARRY** = ``2`` Similar to :ref:`BLEND_MODE_DISCRETE`, but starts the new animation at the last animation's playback position. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeBlendSpace1D_property_blend_mode: .. rst-class:: classref-property :ref:`BlendMode` **blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) - :ref:`BlendMode` **get_blend_mode**\ (\ ) Controls the interpolation between animations. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_property_max_space: .. rst-class:: classref-property :ref:`float` **max_space** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_max_space**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_max_space**\ (\ ) The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_property_min_space: .. rst-class:: classref-property :ref:`float` **min_space** = ``-1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_min_space**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_min_space**\ (\ ) The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_property_snap: .. rst-class:: classref-property :ref:`float` **snap** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_snap**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_snap**\ (\ ) Position increment to snap to when moving a point on the axis. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_property_sync: .. rst-class:: classref-property :ref:`bool` **sync** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_sync**\ (\ value\: :ref:`bool`\ ) - :ref:`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. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_property_value_label: .. rst-class:: classref-property :ref:`String` **value_label** = ``"value"`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_value_label**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_value_label**\ (\ ) Label of the virtual axis of the blend space. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_AnimationNodeBlendSpace1D_method_add_blend_point: .. rst-class:: classref-method |void| **add_blend_point**\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`float`, at_index\: :ref:`int` = -1\ ) :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count: .. rst-class:: classref-method :ref:`int` **get_blend_point_count**\ (\ ) |const| :ref:`🔗` Returns the number of points on the blend axis. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node: .. rst-class:: classref-method :ref:`AnimationRootNode` **get_blend_point_node**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the :ref:`AnimationNode` referenced by the point at index ``point``. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position: .. rst-class:: classref-method :ref:`float` **get_blend_point_position**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the point at index ``point``. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point: .. rst-class:: classref-method |void| **remove_blend_point**\ (\ point\: :ref:`int`\ ) :ref:`🔗` Removes the point at index ``point`` from the blend axis. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node: .. rst-class:: classref-method |void| **set_blend_point_node**\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) :ref:`🔗` Changes the :ref:`AnimationNode` referenced by the point at index ``point``. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position: .. rst-class:: classref-method |void| **set_blend_point_position**\ (\ point\: :ref:`int`, pos\: :ref:`float`\ ) :ref:`🔗` Updates the position of the point at index ``point`` on the blend axis. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`