Skip to content

Commit 204c137

Browse files
committed
Added the bone names which Unity's FBX importer can detect to the dictionary.
1 parent 1d3d931 commit 204c137

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

Editor/Scripts/Internal/AvatarUtils.cs

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal class AvatarUtils
1010
// In this case they match the naming from the included Mixamo model on the left
1111
// and the Unity equivalent name on the right.
1212
// This does not need to be hard-coded.
13-
public static Dictionary<string, string> HumanSkeletonNames = new Dictionary<string, string>()
13+
static Dictionary<string, string> HumanSkeletonNames = new Dictionary<string, string>()
1414
{
1515
{"mixamorig:spine1", "Chest"},
1616
{"mixamorig:head", "Head" },
@@ -170,9 +170,43 @@ internal class AvatarUtils
170170
{"rightlegupper_jnt", "RightUpperLeg"},
171171
{"rightleglower_jnt", "RightLowerLeg"},
172172
{"rightfootball_jnt", "RightFoot"},
173-
{"rightfoottoe_jnt", "RightToes"}
173+
{"rightfoottoe_jnt", "RightToes"},
174174

175-
};
175+
// Simple bone names Unity's FBX importer can detect.
176+
{ "lefttoe", "LeftToes" },
177+
{ "righttoe", "RightToes" },
178+
{ "jaw", "Jaw" },
179+
{"leftthumb1", "Left Thumb Proximal"},
180+
{"leftthumb2", "Left Thumb Intermediate"},
181+
{"leftthumb3", "Left Thumb Distal"},
182+
{"leftindex1", "Left Index Proximal" },
183+
{"leftindex2", "Left Index Intermediate"},
184+
{"leftindex3", "Left Index Distal"},
185+
{"leftmiddle1", "Left Middle Proximal"},
186+
{"leftmiddle2", "Left Middle Intermediate"},
187+
{"leftmiddle3", "Left Middle Distal"},
188+
{"leftring1", "Left Ring Proximal"},
189+
{"leftring2", "Left Ring Intermediate"},
190+
{"leftring3", "Left Ring Distal"},
191+
{"leftpinky1", "Left Little Proximal"},
192+
{"leftpinky2", "Left Little Intermediate"},
193+
{"leftpinky3", "Left Little Distal"},
194+
{"rightthumb1", "Right Thumb Proximal"},
195+
{"rightthumb2", "Right Thumb Intermediate"},
196+
{"rightthumb3", "Right Thumb Distal"},
197+
{"rightindex1", "Right Index Proximal"},
198+
{"rightindex2", "Right Index Intermediate"},
199+
{"rightindex3", "Right Index Distal"},
200+
{"rightmiddle1", "Right Middle Proximal"},
201+
{"rightmiddle2", "Right Middle Intermediate"},
202+
{"rightmiddle3", "Right Middle Distal"},
203+
{"rightring1", "Right Ring Proximal"},
204+
{"rightring2", "Right Ring Intermediate"},
205+
{"rightring3", "Right Ring Distal"},
206+
{"rightpinky1", "Right Little Proximal"},
207+
{"rightpinky2", "Right Little Intermediate"},
208+
{"rightpinky3", "Right Little Distal"}
209+
};
176210

177211
/// <summary>
178212
/// Create a HumanDescription out of an avatar GameObject.

0 commit comments

Comments
 (0)