From d0eb99f9709dad5dc1547f225cb0244febf61544 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Tue, 4 Jun 2019 09:01:24 +0900 Subject: [PATCH] Add documentation for AnimationNode* resources I haven't put [code] bbcode around the amount of the AnimationNodeAdd* classes because it's not exposed to GDScript. Same for the +add, -add, etc. labels: they're just labels you can find in the AnimationTree bottom panel. --- doc/classes/AnimationNode.xml | 1 + doc/classes/AnimationNodeAdd2.xml | 3 +++ doc/classes/AnimationNodeAdd3.xml | 7 ++++++ doc/classes/AnimationNodeAnimation.xml | 3 +++ doc/classes/AnimationNodeBlend2.xml | 3 +++ doc/classes/AnimationNodeBlend3.xml | 7 ++++++ doc/classes/AnimationNodeBlendSpace1D.xml | 16 +++++++++++++ doc/classes/AnimationNodeBlendSpace2D.xml | 28 +++++++++++++++++++++-- 8 files changed, 66 insertions(+), 2 deletions(-) diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 9854d4c27e..23f7a316d9 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -215,6 +215,7 @@ + Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index ac2a28e396..890d6f8b49 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -1,8 +1,10 @@ + Blends two animations additively inside of an [AnimationNodeBlendTree]. + A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range. @@ -10,6 +12,7 @@ + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 9cfeb47378..4e36f0bae4 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -1,8 +1,14 @@ + Blends two of three animations additively inside of an [AnimationNodeBlendTree]. + A resource to add to an [AnimationNodeBlendTree]. Blends two animations together additively out of three based on a value in the [-1.0, 1.0] range. + This node has three inputs: + - The base animation to add to + - A -add animation to blend with when the blend amount is in the [-1.0, 0.0] range. + - A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range @@ -10,6 +16,7 @@ + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index e7d53fc7b3..420a702d38 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -1,8 +1,10 @@ + Input animation to use in an [AnimationNodeBlendTree]. + A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together. @@ -10,6 +12,7 @@ + Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index f15fa44f39..9358c5eeef 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -1,8 +1,10 @@ + Blends two animations linearly inside of an [AnimationNodeBlendTree]. + A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range. @@ -10,6 +12,7 @@ + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 2f82eea041..9b9cf80968 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -1,8 +1,14 @@ + Blends two of three animations linearly inside of an [AnimationNodeBlendTree]. + A resource to add to an [AnimationNodeBlendTree]. Blends two animations together linearly out of three based on a value in the [-1.0, 1.0] range. + This node has three inputs: + - The base animation + - A -blend animation to blend with when the blend amount is in the [-1.0, 0.0] range. + - A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range @@ -10,6 +16,7 @@ + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index b13aee277e..6fb5c6312b 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -1,8 +1,13 @@ + Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis. + A resource to add to an [AnimationNodeBlendTree]. + This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point]. + Outputs the linear blend of the two [code]AnimationNode[/code] closest to the node's current [code]value[/code]. + You can set the extents of the axis using the [member min_space] and [member max_space]. @@ -17,12 +22,14 @@ + Add a new point that represents a [code]node[/code] on the virtual axis at a given 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. + Returns the number of points on the blend axis. @@ -31,6 +38,7 @@ + Returns the [code]AnimationNode[/code] referenced by the point at index [code]point[/code]. @@ -39,6 +47,7 @@ + Returns the position of the point at index [code]point[/code]. @@ -47,6 +56,7 @@ + Removes the point at index [code]point[/code] from the blend axis. @@ -57,6 +67,7 @@ + Changes the AnimationNode referenced by the point at index [code]point[/code]. @@ -67,17 +78,22 @@ + Updates the position of the point at index [code]point[/code] on the blend axis. + The blend space's axis's upper limit for the points' position. See [method add_blend_point]. + The blend space's axis's lower limit for the points' position. See [method add_blend_point]. + Position increment to snap to when moving a point on the axis. + Label of the virtual axis of the blend space. diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 2ec5977301..74d4f1c60d 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -1,8 +1,12 @@ + Blends linearly between three [AnimationNode] of any type placed in a 2d space. + 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. @@ -17,6 +21,7 @@ + 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. @@ -31,12 +36,14 @@ + 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. + Returns the number of points in the blend space. @@ -45,6 +52,7 @@ + Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code]. @@ -53,12 +61,14 @@ + Returns the position of the point at index [code]point[/code]. + Returns the number of triangles in the blend space. @@ -69,6 +79,7 @@ + Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code]. @@ -77,6 +88,7 @@ + Removes the point at index [code]point[/code] from the blend space. @@ -85,6 +97,7 @@ + Removes the triangle at index [code]triangle[/code] from the blend space. @@ -95,6 +108,7 @@ + Changes the AnimationNode referenced by the point at index [code]point[/code]. @@ -105,39 +119,49 @@ + Updates the position of the point at index [code]point[/code] on the blend axis. + 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]. + Controls the interpolation between animations. See [enum BlendMode] constants. + The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]. + The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]. + Position increment to snap to when moving a point. + Name of the blend space's X axis. + Name of the blend space's Y axis. + Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. + The interpolation between animations is linear. - Useful for frame-by-frame 2D animations. + The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. - Keep the current play position when switching between discrete animations. + Similar to [const BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.