:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the AnimationNodeBlendSpace1D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_AnimationNodeBlendSpace1D: AnimationNodeBlendSpace1D ========================= **Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Blends linearly between two of any number of :ref:`AnimationNode` of any type placed on a virtual axis. Description ----------- A resource to add to an :ref:`AnimationNodeBlendTree`. This is a virtual axis on which you can add any type of :ref:`AnimationNode` using :ref:`add_blend_point`. Outputs the linear blend of the two :ref:`AnimationNode`\ s closest to the node's current value. You can set the extents of the axis using the :ref:`min_space` and :ref:`max_space`. Tutorials --------- - :doc:`../tutorials/animation/animation_tree` Properties ---------- +-----------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`max_space` | ``1.0`` | +-----------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`min_space` | ``-1.0`` | +-----------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`float` | :ref:`snap` | ``0.1`` | +-----------------------------+--------------------------------------------------------------------------+-------------+ | :ref:`String` | :ref:`value_label` | ``"value"`` | +-----------------------------+--------------------------------------------------------------------------+-------------+ Methods ------- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_blend_point` **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_blend_point_count` **(** **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationRootNode` | :ref:`get_blend_point_node` **(** :ref:`int` point **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_blend_point_position` **(** :ref:`int` point **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_blend_point` **(** :ref:`int` point **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_blend_point_node` **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_blend_point_position` **(** :ref:`int` point, :ref:`float` pos **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- .. _class_AnimationNodeBlendSpace1D_property_max_space: - :ref:`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_property_min_space: - :ref:`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_property_snap: - :ref:`float` **snap** +-----------+-----------------+ | *Default* | ``0.1`` | +-----------+-----------------+ | *Setter* | set_snap(value) | +-----------+-----------------+ | *Getter* | get_snap() | +-----------+-----------------+ Position increment to snap to when moving a point on the axis. ---- .. _class_AnimationNodeBlendSpace1D_property_value_label: - :ref:`String` **value_label** +-----------+------------------------+ | *Default* | ``"value"`` | +-----------+------------------------+ | *Setter* | set_value_label(value) | +-----------+------------------------+ | *Getter* | get_value_label() | +-----------+------------------------+ Label of the virtual axis of the blend space. Method Descriptions ------------------- .. _class_AnimationNodeBlendSpace1D_method_add_blend_point: - void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`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. ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_count: - :ref:`int` **get_blend_point_count** **(** **)** |const| Returns the number of points on the blend axis. ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_node: - :ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| Returns the :ref:`AnimationNode` referenced by the point at index ``point``. ---- .. _class_AnimationNodeBlendSpace1D_method_get_blend_point_position: - :ref:`float` **get_blend_point_position** **(** :ref:`int` point **)** |const| Returns the position of the point at index ``point``. ---- .. _class_AnimationNodeBlendSpace1D_method_remove_blend_point: - void **remove_blend_point** **(** :ref:`int` point **)** Removes the point at index ``point`` from the blend axis. ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_node: - void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** Changes the :ref:`AnimationNode` referenced by the point at index ``point``. ---- .. _class_AnimationNodeBlendSpace1D_method_set_blend_point_position: - void **set_blend_point_position** **(** :ref:`int` point, :ref:`float` pos **)** 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.)` .. |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.)`