From 549ce8f0d3d6ef7c13c045c86398b61efc4db7d1 Mon Sep 17 00:00:00 2001 From: bd_ Date: Mon, 2 Jan 2023 16:03:06 +0900 Subject: [PATCH] fix: add more heuristic bone mappings --- .../Editor/HeuristicBoneMapper.cs | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/Packages/nadena.dev.modular-avatar/Editor/HeuristicBoneMapper.cs b/Packages/nadena.dev.modular-avatar/Editor/HeuristicBoneMapper.cs index 82a2345c..919672e2 100644 --- a/Packages/nadena.dev.modular-avatar/Editor/HeuristicBoneMapper.cs +++ b/Packages/nadena.dev.modular-avatar/Editor/HeuristicBoneMapper.cs @@ -13,10 +13,10 @@ namespace nadena.dev.modular_avatar.core.editor private static string[][] boneNamePatterns = new[] { new[] {"Hips", "Hip"}, - new[] {"LeftUpperLeg", "UpperLeg_Left", "UpperLeg_L", "Leg_Left", "Leg_L"}, - new[] {"RightUpperLeg", "UpperLeg_Right", "UpperLeg_R", "Leg_Right", "Leg_R"}, - new[] {"LeftLowerLeg", "LowerLeg_Left", "LowerLeg_L", "Knee_Left", "Knee_L"}, - new[] {"RightLowerLeg", "LowerLeg_Right", "LowerLeg_R", "Knee_Right", "Knee_R"}, + new[] {"LeftUpperLeg", "UpperLeg_Left", "UpperLeg_L", "Leg_Left", "Leg_L", "ULeg_L"}, + new[] {"RightUpperLeg", "UpperLeg_Right", "UpperLeg_R", "Leg_Right", "Leg_R", "ULeg_R"}, + new[] {"LeftLowerLeg", "LowerLeg_Left", "LowerLeg_L", "Knee_Left", "Knee_L", "LLeg_L"}, + new[] {"RightLowerLeg", "LowerLeg_Right", "LowerLeg_R", "Knee_Right", "Knee_R", "LLeg_R"}, new[] {"LeftFoot", "Foot_Left", "Foot_L"}, new[] {"RightFoot", "Foot_Right", "Foot_R"}, new[] {"Spine"}, @@ -25,10 +25,10 @@ namespace nadena.dev.modular_avatar.core.editor new[] {"Head"}, new[] {"LeftShoulder", "Shoulder_Left", "Shoulder_L"}, new[] {"RightShoulder", "Shoulder_Right", "Shoulder_R"}, - new[] {"LeftUpperArm", "UpperArm_Left", "UpperArm_L", "Arm_Left", "Arm_L"}, - new[] {"RightUpperArm", "UpperArm_Right", "UpperArm_R", "Arm_Right", "Arm_R"}, - new[] {"LeftLowerArm", "LowerArm_Left", "LowerArm_L"}, - new[] {"RightLowerArm", "LowerArm_Right", "LowerArm_R"}, + new[] {"LeftUpperArm", "UpperArm_Left", "UpperArm_L", "Arm_Left", "Arm_L", "UArm_L"}, + new[] {"RightUpperArm", "UpperArm_Right", "UpperArm_R", "Arm_Right", "Arm_R", "UArm_R"}, + new[] {"LeftLowerArm", "LowerArm_Left", "LowerArm_L", "LArm_L"}, + new[] {"RightLowerArm", "LowerArm_Right", "LowerArm_R", "LArm_R"}, new[] {"LeftHand", "Hand_Left", "Hand_L"}, new[] {"RightHand", "Hand_Right", "Hand_R"}, new[] {"LeftToes", "Toes_Left", "Toe_Left", "ToeIK_L", "Toes_L", "Toe_L"}, @@ -36,37 +36,37 @@ namespace nadena.dev.modular_avatar.core.editor new[] {"LeftEye", "Eye_Left", "Eye_L"}, new[] {"RightEye", "Eye_Right", "Eye_R"}, new[] {"Jaw"}, - new[] {"LeftThumbProximal", "ProximalThumb_Left", "ProximalThumb_L"}, - new[] {"LeftThumbIntermediate", "IntermediateThumb_Left", "IntermediateThumb_L"}, - new[] {"LeftThumbDistal", "DistalThumb_Left", "DistalThumb_L"}, - new[] {"LeftIndexProximal", "ProximalIndex_Left", "ProximalIndex_L"}, - new[] {"LeftIndexIntermediate", "IntermediateIndex_Left", "IntermediateIndex_L"}, - new[] {"LeftIndexDistal", "DistalIndex_Left", "DistalIndex_L"}, - new[] {"LeftMiddleProximal", "ProximalMiddle_Left", "ProximalMiddle_L"}, - new[] {"LeftMiddleIntermediate", "IntermediateMiddle_Left", "IntermediateMiddle_L"}, - new[] {"LeftMiddleDistal", "DistalMiddle_Left", "DistalMiddle_L"}, - new[] {"LeftRingProximal", "ProximalRing_Left", "ProximalRing_L"}, - new[] {"LeftRingIntermediate", "IntermediateRing_Left", "IntermediateRing_L"}, - new[] {"LeftRingDistal", "DistalRing_Left", "DistalRing_L"}, - new[] {"LeftLittleProximal", "ProximalLittle_Left", "ProximalLittle_L"}, - new[] {"LeftLittleIntermediate", "IntermediateLittle_Left", "IntermediateLittle_L"}, - new[] {"LeftLittleDistal", "DistalLittle_Left", "DistalLittle_L"}, - new[] {"RightThumbProximal", "ProximalThumb_Right", "ProximalThumb_R"}, - new[] {"RightThumbIntermediate", "IntermediateThumb_Right", "IntermediateThumb_R"}, - new[] {"RightThumbDistal", "DistalThumb_Right", "DistalThumb_R"}, - new[] {"RightIndexProximal", "ProximalIndex_Right", "ProximalIndex_R"}, - new[] {"RightIndexIntermediate", "IntermediateIndex_Right", "IntermediateIndex_R"}, - new[] {"RightIndexDistal", "DistalIndex_Right", "DistalIndex_R"}, - new[] {"RightMiddleProximal", "ProximalMiddle_Right", "ProximalMiddle_R"}, - new[] {"RightMiddleIntermediate", "IntermediateMiddle_Right", "IntermediateMiddle_R"}, - new[] {"RightMiddleDistal", "DistalMiddle_Right", "DistalMiddle_R"}, - new[] {"RightRingProximal", "ProximalRing_Right", "ProximalRing_R"}, - new[] {"RightRingIntermediate", "IntermediateRing_Right", "IntermediateRing_R"}, - new[] {"RightRingDistal", "DistalRing_Right", "DistalRing_R"}, - new[] {"RightLittleProximal", "ProximalLittle_Right", "ProximalLittle_R"}, - new[] {"RightLittleIntermediate", "IntermediateLittle_Right", "IntermediateLittle_R"}, - new[] {"RightLittleDistal", "DistalLittle_Right", "DistalLittle_R"}, - new[] {"UpperChest"}, + new[] {"LeftThumbProximal", "ProximalThumb_Left", "ProximalThumb_L", "Thumb1_L"}, + new[] {"LeftThumbIntermediate", "IntermediateThumb_Left", "IntermediateThumb_L", "Thumb2_L"}, + new[] {"LeftThumbDistal", "DistalThumb_Left", "DistalThumb_L", "Thumb3_L"}, + new[] {"LeftIndexProximal", "ProximalIndex_Left", "ProximalIndex_L", "Index1_L"}, + new[] {"LeftIndexIntermediate", "IntermediateIndex_Left", "IntermediateIndex_L", "Index2_L"}, + new[] {"LeftIndexDistal", "DistalIndex_Left", "DistalIndex_L", "Index3_L"}, + new[] {"LeftMiddleProximal", "ProximalMiddle_Left", "ProximalMiddle_L", "Middle1_L"}, + new[] {"LeftMiddleIntermediate", "IntermediateMiddle_Left", "IntermediateMiddle_L", "Middle2_L"}, + new[] {"LeftMiddleDistal", "DistalMiddle_Left", "DistalMiddle_L", "Middle3_L"}, + new[] {"LeftRingProximal", "ProximalRing_Left", "ProximalRing_L", "Ring1_L"}, + new[] {"LeftRingIntermediate", "IntermediateRing_Left", "IntermediateRing_L", "Ring2_L"}, + new[] {"LeftRingDistal", "DistalRing_Left", "DistalRing_L", "Ring3_L"}, + new[] {"LeftLittleProximal", "ProximalLittle_Left", "ProximalLittle_L", "Little1_L"}, + new[] {"LeftLittleIntermediate", "IntermediateLittle_Left", "IntermediateLittle_L", "Little2_L"}, + new[] {"LeftLittleDistal", "DistalLittle_Left", "DistalLittle_L", "Little3_L"}, + new[] {"RightThumbProximal", "ProximalThumb_Right", "ProximalThumb_R", "Thumb1_R"}, + new[] {"RightThumbIntermediate", "IntermediateThumb_Right", "IntermediateThumb_R", "Thumb2_R"}, + new[] {"RightThumbDistal", "DistalThumb_Right", "DistalThumb_R", "Thumb3_R"}, + new[] {"RightIndexProximal", "ProximalIndex_Right", "ProximalIndex_R", "Index1_R"}, + new[] {"RightIndexIntermediate", "IntermediateIndex_Right", "IntermediateIndex_R", "Index2_R"}, + new[] {"RightIndexDistal", "DistalIndex_Right", "DistalIndex_R", "Index3_R"}, + new[] {"RightMiddleProximal", "ProximalMiddle_Right", "ProximalMiddle_R", "Middle1_R"}, + new[] {"RightMiddleIntermediate", "IntermediateMiddle_Right", "IntermediateMiddle_R", "Middle2_R"}, + new[] {"RightMiddleDistal", "DistalMiddle_Right", "DistalMiddle_R", "Middle3_R"}, + new[] {"RightRingProximal", "ProximalRing_Right", "ProximalRing_R", "Ring1_R"}, + new[] {"RightRingIntermediate", "IntermediateRing_Right", "IntermediateRing_R", "Ring2_R"}, + new[] {"RightRingDistal", "DistalRing_Right", "DistalRing_R", "Ring3_R"}, + new[] {"RightLittleProximal", "ProximalLittle_Right", "ProximalLittle_R", "Little1_R"}, + new[] {"RightLittleIntermediate", "IntermediateLittle_Right", "IntermediateLittle_R", "Little2_R"}, + new[] {"RightLittleDistal", "DistalLittle_Right", "DistalLittle_R", "Little3_R"}, + new[] {"UpperChest", "UChest"}, }; internal static string NormalizeName(string name)