From dc43cfc830e7e602ad5aa1f59ceaa82e344dd378 Mon Sep 17 00:00:00 2001 From: Silc Renew Date: Mon, 27 Jun 2022 17:06:50 +0900 Subject: implement bone renamer in importer --- doc/classes/BoneMap.xml | 56 +++++++++++++++ doc/classes/EditorScenePostImportPlugin.xml | 4 +- doc/classes/NodePath.xml | 6 ++ doc/classes/SkeletonProfile.xml | 106 ++++++++++++++++++++++++++++ doc/classes/SkeletonProfileHumanoid.xml | 14 ++++ 5 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 doc/classes/BoneMap.xml create mode 100644 doc/classes/SkeletonProfile.xml create mode 100644 doc/classes/SkeletonProfileHumanoid.xml (limited to 'doc/classes') diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml new file mode 100644 index 0000000000..371cb4fa93 --- /dev/null +++ b/doc/classes/BoneMap.xml @@ -0,0 +1,56 @@ + + + + Bone map for retargeting. + + + This class contains a hashmap that uses a list of bone names in [SkeletonProfile] as key names. + By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile]. + + + + + + + + + Returns a profile bone name having [code]skeleton_bone_name[/code]. If not found, an empty [StringName] will be returned. + In the retargeting process, the returned bone name is the bone name of the target skeleton. + + + + + + + Returns a skeleton bone name is mapped to [code]profile_bone_name[/code]. + In the retargeting process, the returned bone name is the bone name of the source skeleton. + + + + + + + + Maps a skeleton bone name to [code]profile_bone_name[/code]. + In the retargeting process, the setting bone name is the bone name of the source skeleton. + + + + + + A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are synchronized with it. + + + + + + This signal is emitted when change the key value in the [BoneMap]. This is used to validate mapping and to update [BoneMap] editor. + + + + + This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the [BoneMap] and to redraw the [BoneMap] editor. + + + + diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml index 0fdbd5db1e..93fd5e46ba 100644 --- a/doc/classes/EditorScenePostImportPlugin.xml +++ b/doc/classes/EditorScenePostImportPlugin.xml @@ -114,7 +114,9 @@ - + + + diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 00c5dcaa3d..d9e0680a38 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -87,6 +87,12 @@ [/codeblocks] + + + + Returns all paths concatenated with a slash character ([code]/[/code]) as separator without subnames. + + diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml new file mode 100644 index 0000000000..55a2ea6759 --- /dev/null +++ b/doc/classes/SkeletonProfile.xml @@ -0,0 +1,106 @@ + + + + Profile of a virtual skeleton used as a target for retargeting. + + + This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile]. + + + + + + + + + Returns the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap]. + In the retargeting process, the returned bone name is the bone name of the target skeleton. + + + + + + + Returns the group of the bone at [code]bone_idx[/code]. + + + + + + + Returns the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor. + + + + + + + Returns the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor. + This is the offset with origin at the top left corner of the square. + + + + + + + Returns the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor. + + + + + + + + Sets the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap]. + In the retargeting process, the setting bone name is the bone name of the target skeleton. + + + + + + + + Sets the group of the bone at [code]bone_idx[/code]. + + + + + + + + Sets the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor. + + + + + + + + Sets the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor. + This is the offset with origin at the top left corner of the square. + + + + + + + + Sets the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor. + + + + + + + + + + + + + This signal is emitted when change the value in profile. This is used to update key name in the [BoneMap] and to redraw the [BoneMap] editor. + [b]Note[/b]: This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the [BoneMap]. + + + + diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml new file mode 100644 index 0000000000..065184244e --- /dev/null +++ b/doc/classes/SkeletonProfileHumanoid.xml @@ -0,0 +1,14 @@ + + + + + + A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only. + + + + + + + + -- cgit v1.2.3