2018-07-26 09:56:21 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-07-05 09:32:53 +00:00
<class name= "AnimationNodeBlendSpace2D" inherits= "AnimationRootNode" category= "Core" version= "3.1.2" >
2018-07-26 09:56:21 +00:00
<brief_description >
2019-06-04 00:01:24 +00:00
Blends linearly between three [AnimationNode] of any type placed in a 2d space.
2018-07-26 09:56:21 +00:00
</brief_description>
<description >
2019-06-04 00:01:24 +00:00
A resource to add to an [AnimationNodeBlendTree].
This node allows you to blend linearly between three animations using a [Vector2] weight.
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
2018-07-26 09:56:21 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_blend_point" >
<return type= "void" >
</return>
<argument index= "0" name= "node" type= "AnimationRootNode" >
</argument>
<argument index= "1" name= "pos" type= "Vector2" >
</argument>
<argument index= "2" name= "at_index" type= "int" default= "-1" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Add a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "add_triangle" >
<return type= "void" >
</return>
<argument index= "0" name= "x" type= "int" >
</argument>
<argument index= "1" name= "y" type= "int" >
</argument>
<argument index= "2" name= "z" type= "int" >
</argument>
<argument index= "3" name= "at_index" type= "int" default= "-1" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_blend_point_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-06-04 00:01:24 +00:00
Returns the number of points in the blend space.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_blend_point_node" qualifiers= "const" >
<return type= "AnimationRootNode" >
</return>
<argument index= "0" name= "point" type= "int" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_blend_point_position" qualifiers= "const" >
<return type= "Vector2" >
</return>
<argument index= "0" name= "point" type= "int" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Returns the position of the point at index [code]point[/code].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_triangle_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2019-06-04 00:01:24 +00:00
Returns the number of triangles in the blend space.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "get_triangle_point" >
<return type= "int" >
</return>
<argument index= "0" name= "triangle" type= "int" >
</argument>
<argument index= "1" name= "point" type= "int" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "remove_blend_point" >
<return type= "void" >
</return>
<argument index= "0" name= "point" type= "int" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Removes the point at index [code]point[/code] from the blend space.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "remove_triangle" >
<return type= "void" >
</return>
<argument index= "0" name= "triangle" type= "int" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Removes the triangle at index [code]triangle[/code] from the blend space.
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "set_blend_point_node" >
<return type= "void" >
</return>
<argument index= "0" name= "point" type= "int" >
</argument>
<argument index= "1" name= "node" type= "AnimationRootNode" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Changes the AnimationNode referenced by the point at index [code]point[/code].
2018-07-26 09:56:21 +00:00
</description>
</method>
<method name= "set_blend_point_position" >
<return type= "void" >
</return>
<argument index= "0" name= "point" type= "int" >
</argument>
<argument index= "1" name= "pos" type= "Vector2" >
</argument>
<description >
2019-06-04 00:01:24 +00:00
Updates the position of the point at index [code]point[/code] on the blend axis.
2018-07-26 09:56:21 +00:00
</description>
</method>
</methods>
<members >
<member name= "auto_triangles" type= "bool" setter= "set_auto_triangles" getter= "get_auto_triangles" >
2019-06-04 00:01:24 +00:00
If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point].
2018-07-26 09:56:21 +00:00
</member>
2018-11-23 00:06:24 +00:00
<member name= "blend_mode" type= "int" setter= "set_blend_mode" getter= "get_blend_mode" enum= "AnimationNodeBlendSpace2D.BlendMode" >
2019-06-04 00:01:24 +00:00
Controls the interpolation between animations. See [enum BlendMode] constants.
2018-11-23 00:06:24 +00:00
</member>
2018-07-26 09:56:21 +00:00
<member name= "max_space" type= "Vector2" setter= "set_max_space" getter= "get_max_space" >
2019-06-04 00:01:24 +00:00
The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point].
2018-07-26 09:56:21 +00:00
</member>
<member name= "min_space" type= "Vector2" setter= "set_min_space" getter= "get_min_space" >
2019-06-04 00:01:24 +00:00
The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point].
2018-07-26 09:56:21 +00:00
</member>
<member name= "snap" type= "Vector2" setter= "set_snap" getter= "get_snap" >
2019-06-04 00:01:24 +00:00
Position increment to snap to when moving a point.
2018-07-26 09:56:21 +00:00
</member>
<member name= "x_label" type= "String" setter= "set_x_label" getter= "get_x_label" >
2019-06-04 00:01:24 +00:00
Name of the blend space's X axis.
2018-07-26 09:56:21 +00:00
</member>
<member name= "y_label" type= "String" setter= "set_y_label" getter= "get_y_label" >
2019-06-04 00:01:24 +00:00
Name of the blend space's Y axis.
2018-07-26 09:56:21 +00:00
</member>
</members>
2019-01-15 12:26:47 +00:00
<signals >
<signal name= "triangles_updated" >
<description >
2019-06-04 00:01:24 +00:00
Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position.
2019-01-15 12:26:47 +00:00
</description>
</signal>
</signals>
2018-07-26 09:56:21 +00:00
<constants >
2018-11-23 00:06:24 +00:00
<constant name= "BLEND_MODE_INTERPOLATED" value= "0" enum= "BlendMode" >
2019-06-04 00:01:24 +00:00
The interpolation between animations is linear.
2018-11-23 00:06:24 +00:00
</constant>
<constant name= "BLEND_MODE_DISCRETE" value= "1" enum= "BlendMode" >
2019-06-04 00:01:24 +00:00
The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
2018-11-23 00:06:24 +00:00
</constant>
<constant name= "BLEND_MODE_DISCRETE_CARRY" value= "2" enum= "BlendMode" >
2019-07-29 15:47:30 +00:00
Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
2018-11-23 00:06:24 +00:00
</constant>
2018-07-26 09:56:21 +00:00
</constants>
</class>