| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A set of [AnimationRootNode]s placed on a virtual axis, crossfading between the two adjacent ones. Used by [AnimationTree]. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | A resource used by [AnimationNodeBlendTree]. |
| 8 | [AnimationNodeBlendSpace1D] represents a virtual axis on which any type of [AnimationRootNode]s can be added using [method add_blend_point]. Outputs the linear blend of the two [AnimationRootNode]s adjacent to the current value. |
| 9 | You can set the extents of the axis with [member min_space] and [member max_space]. |
| 10 | </description> |
| 11 | <tutorials> |
| 12 | <link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link> |
| 13 | </tutorials> |
| 14 | <methods> |
| 15 | <method name="add_blend_point"> |
| 16 | <return type="void" /> |
| 17 | <param index="0" name="node" type="AnimationRootNode" /> |
| 18 | <param index="1" name="pos" type="float" /> |
| 19 | <param index="2" name="at_index" type="int" default="-1" /> |
| 20 | <description> |
| 21 | Adds a new point that represents a [param node] on the virtual axis at a given position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. |
| 22 | </description> |
| 23 | </method> |
| 24 | <method name="get_blend_point_count" qualifiers="const"> |
| 25 | <return type="int" /> |
| 26 | <description> |
| 27 | Returns the number of points on the blend axis. |
| 28 | </description> |
| 29 | </method> |
| 30 | <method name="get_blend_point_node" qualifiers="const"> |
| 31 | <return type="AnimationRootNode" /> |
| 32 | <param index="0" name="point" type="int" /> |
| 33 | <description> |
| 34 | Returns the [AnimationNode] referenced by the point at index [param point]. |
| 35 | </description> |
| 36 | </method> |
| 37 | <method name="get_blend_point_position" qualifiers="const"> |
| 38 | <return type="float" /> |
| 39 | <param index="0" name="point" type="int" /> |
| 40 | <description> |
| 41 | Returns the position of the point at index [param point]. |
| 42 | </description> |
| 43 | </method> |
| 44 | <method name="remove_blend_point"> |
| 45 | <return type="void" /> |
| 46 | <param index="0" name="point" type="int" /> |
| 47 | <description> |
| 48 | Removes the point at index [param point] from the blend axis. |
| 49 | </description> |
| 50 | </method> |
| 51 | <method name="set_blend_point_node"> |
| 52 | <return type="void" /> |
| 53 | <param index="0" name="point" type="int" /> |
| 54 | <param index="1" name="node" type="AnimationRootNode" /> |
| 55 | <description> |
| 56 | Changes the [AnimationNode] referenced by the point at index [param point]. |
| 57 | </description> |
| 58 | </method> |
| 59 | <method name="set_blend_point_position"> |
| 60 | <return type="void" /> |
| 61 | <param index="0" name="point" type="int" /> |
| 62 | <param index="1" name="pos" type="float" /> |
| 63 | <description> |
| 64 | Updates the position of the point at index [param point] on the blend axis. |
| 65 | </description> |
| 66 | </method> |
| 67 | </methods> |
| 68 | <members> |
| 69 | <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace1D.BlendMode" default="0"> |
| 70 | Controls the interpolation between animations. |
| 71 | </member> |
| 72 | <member name="max_space" type="float" setter="set_max_space" getter="get_max_space" default="1.0"> |
| 73 | The blend space's axis's upper limit for the points' position. See [method add_blend_point]. |
| 74 | </member> |
| 75 | <member name="min_space" type="float" setter="set_min_space" getter="get_min_space" default="-1.0"> |
| 76 | The blend space's axis's lower limit for the points' position. See [method add_blend_point]. |
| 77 | </member> |
| 78 | <member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1"> |
| 79 | Position increment to snap to when moving a point on the axis. |
| 80 | </member> |
| 81 | <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> |
| 82 | If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code]. |
| 83 | If [code]true[/code], forcing the blended animations to advance frame. |
| 84 | </member> |
| 85 | <member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default=""value""> |
| 86 | Label of the virtual axis of the blend space. |
| 87 | </member> |
| 88 | </members> |
| 89 | <constants> |
| 90 | <constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode"> |
| 91 | The interpolation between animations is linear. |
| 92 | </constant> |
| 93 | <constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode"> |
| 94 | The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. |
| 95 | </constant> |
| 96 | <constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode"> |
| 97 | Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position. |
| 98 | </constant> |
| 99 | </constants> |
| 100 | </class> |