From ec19ed37230c368b3d24050c9f1e99869dd94bec Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 11 Oct 2021 19:20:58 -0300 Subject: Remove animation 3D transform track, replace by loc/rot/scale tracks. * `Animation.TYPE_TRANSFORM3D` track is gone. * Added POSITION_3D, ROTATION_3D, SCALE_3D tracks. * GLTF2, Collada, FBX importers will only import the track types found. * Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed. * AnimationPlayer and AnimationTree animate these tracks separately, only when found. * Removed BakeReset code, is useless with these changes. This is the first in a series of commits designed to make the animation system in Godot more useful, which includes: * Better compatibility with Autodesk products * Better reusability of animations across models (including retargeting). * Proper animation compression. * etc. *Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one. --- doc/classes/Animation.xml | 58 ++++++++++++++++++++++++------------------- doc/classes/AnimationTree.xml | 4 +-- doc/classes/Skeleton3D.xml | 38 +++++++++++++++++++++++++--- 3 files changed, 69 insertions(+), 31 deletions(-) (limited to 'doc') diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index d2ecbdde26..a35b784106 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -253,6 +253,14 @@ Returns the arguments values to be called on a method track for a given key in a given track. + + + + + + + + @@ -260,6 +268,22 @@ Removes a track by specifying the track index. + + + + + + + + + + + + + + + + @@ -466,25 +490,6 @@ Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code]. - - - - - - - - - Insert a transform key for a transform track. - - - - - - - - Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]). - - @@ -541,19 +546,22 @@ Value tracks set values in node properties, but only those which can be Interpolated. - - Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated. + + + + + - + Method tracks call functions with given arguments per key. - + Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]). - + Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation. - + Animation tracks play animations in other [AnimationPlayer] nodes. diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 3d112e258e..40dcd950d7 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -22,7 +22,7 @@ - Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView]. + Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_SCALE_3D] or [constant Animation.TYPE_ROTATION_3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView]. @@ -45,7 +45,7 @@ The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. - If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView]. + If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D] the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView]. The root animation node of this [AnimationTree]. See [AnimationNode]. diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 6ab5ed55a3..e046527b17 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -144,6 +144,24 @@ Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. + + + + + + + + + + + + + + + + + + @@ -337,13 +355,25 @@ [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. - + - + + + + + + + + + + + + + + + - Sets the pose transform for bone [code]bone_idx[/code]. - [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space. -- cgit v1.2.3