From 24905becb26771e14c05d0976628cd494513f49a Mon Sep 17 00:00:00 2001 From: TwistedTwigleg Date: Tue, 26 May 2020 14:17:11 -0400 Subject: Made low level changes to the Skeleton3D class and Skeleton3D inspector. Changes listed below: * Added helper functions to Skeleton3D for converting transforms from bone space to global space, and vice versa. * Updated the Skeleton3D class reference. * Changed the icon used for bones in the Skeleton3D inspector to use BoneAttachement3D's icon. * Changed the Skeleton3D inspector to use EditorPropertyTransform and EditorPropertyVector3 when possible. * Placed the Transform/Matrix for each bone in a sub-section, so it is visually similar to the Node3D inspector. --- doc/classes/Skeleton3D.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 640cbe84f5..183fd5396f 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -31,6 +31,16 @@ [i]Deprecated soon.[/i] + + + + + + + Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. + This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes. + + @@ -42,6 +52,7 @@ + Removes the global pose override on all bones in the skeleton. @@ -136,12 +147,14 @@ + Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled. + Returns all bones in the skeleton to their rest poses. @@ -150,6 +163,8 @@ + Adds a collision exception to the physical bone. + Works just like the [RigidBody3D] node. @@ -158,6 +173,8 @@ + Removes a collision exception to the physical bone. + Works just like the [RigidBody3D] node. @@ -166,12 +183,15 @@ + Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. + Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. + Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating. @@ -180,6 +200,7 @@ + Binds the given Skin to the Skeleton. @@ -190,6 +211,8 @@ + Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. @@ -200,6 +223,7 @@ + Disables the rest pose for the bone at [code]bone_idx[/code] if [code]true[/code], enables the bone rest if [code]false[/code]. @@ -214,6 +238,9 @@ + Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. @@ -237,6 +264,7 @@ Returns 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_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. @@ -267,6 +295,17 @@ + Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of it's parent prior to being reset. + + + + + + + + + Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. + This is useful for using setting bone poses using transforms from [Node3D]-based nodes. -- cgit v1.2.3