JsonSchema からコード生成。Metacarpal に関する修正。

This commit is contained in:
ousttrue 2022-06-24 17:32:49 +09:00
parent 29be2767b1
commit 65c78681e4
9 changed files with 59 additions and 104 deletions

View File

@ -378,13 +378,13 @@ public static HumanBones __humanoid_Deserialize_HumanBones(JsonNode parsed)
continue;
}
if(key=="leftThumbProximal"){
value.LeftThumbProximal = __humanoid__humanBones_Deserialize_LeftThumbProximal(kv.Value);
if(key=="leftThumbMetacarpal"){
value.LeftThumbMetacarpal = __humanoid__humanBones_Deserialize_LeftThumbMetacarpal(kv.Value);
continue;
}
if(key=="leftThumbIntermediate"){
value.LeftThumbIntermediate = __humanoid__humanBones_Deserialize_LeftThumbIntermediate(kv.Value);
if(key=="leftThumbProximal"){
value.LeftThumbProximal = __humanoid__humanBones_Deserialize_LeftThumbProximal(kv.Value);
continue;
}
@ -453,13 +453,13 @@ public static HumanBones __humanoid_Deserialize_HumanBones(JsonNode parsed)
continue;
}
if(key=="rightThumbProximal"){
value.RightThumbProximal = __humanoid__humanBones_Deserialize_RightThumbProximal(kv.Value);
if(key=="rightThumbMetacarpal"){
value.RightThumbMetacarpal = __humanoid__humanBones_Deserialize_RightThumbMetacarpal(kv.Value);
continue;
}
if(key=="rightThumbIntermediate"){
value.RightThumbIntermediate = __humanoid__humanBones_Deserialize_RightThumbIntermediate(kv.Value);
if(key=="rightThumbProximal"){
value.RightThumbProximal = __humanoid__humanBones_Deserialize_RightThumbProximal(kv.Value);
continue;
}
@ -1207,7 +1207,7 @@ public static HumanBone __humanoid__humanBones_Deserialize_RightHand(JsonNode pa
return value;
}
public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbProximal(JsonNode parsed)
public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbMetacarpal(JsonNode parsed)
{
var value = new HumanBone();
@ -1234,7 +1234,7 @@ public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbProximal(Jso
return value;
}
public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbIntermediate(JsonNode parsed)
public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbProximal(JsonNode parsed)
{
var value = new HumanBone();
@ -1612,7 +1612,7 @@ public static HumanBone __humanoid__humanBones_Deserialize_LeftLittleDistal(Json
return value;
}
public static HumanBone __humanoid__humanBones_Deserialize_RightThumbProximal(JsonNode parsed)
public static HumanBone __humanoid__humanBones_Deserialize_RightThumbMetacarpal(JsonNode parsed)
{
var value = new HumanBone();
@ -1639,7 +1639,7 @@ public static HumanBone __humanoid__humanBones_Deserialize_RightThumbProximal(Js
return value;
}
public static HumanBone __humanoid__humanBones_Deserialize_RightThumbIntermediate(JsonNode parsed)
public static HumanBone __humanoid__humanBones_Deserialize_RightThumbProximal(JsonNode parsed)
{
var value = new HumanBone();

View File

@ -193,10 +193,10 @@ namespace UniGLTF.Extensions.VRMC_vrm
public HumanBone RightHand;
// Represents a single bone of a Humanoid.
public HumanBone LeftThumbProximal;
public HumanBone LeftThumbMetacarpal;
// Represents a single bone of a Humanoid.
public HumanBone LeftThumbIntermediate;
public HumanBone LeftThumbProximal;
// Represents a single bone of a Humanoid.
public HumanBone LeftThumbDistal;
@ -238,10 +238,10 @@ namespace UniGLTF.Extensions.VRMC_vrm
public HumanBone LeftLittleDistal;
// Represents a single bone of a Humanoid.
public HumanBone RightThumbProximal;
public HumanBone RightThumbMetacarpal;
// Represents a single bone of a Humanoid.
public HumanBone RightThumbIntermediate;
public HumanBone RightThumbProximal;
// Represents a single bone of a Humanoid.
public HumanBone RightThumbDistal;

View File

@ -366,16 +366,16 @@ public static void __humanoid_Serialize_HumanBones(JsonFormatter f, HumanBones v
__humanoid__humanBones_Serialize_RightHand(f, value.RightHand);
}
if(value.LeftThumbMetacarpal!=null){
f.Key("leftThumbMetacarpal");
__humanoid__humanBones_Serialize_LeftThumbMetacarpal(f, value.LeftThumbMetacarpal);
}
if(value.LeftThumbProximal!=null){
f.Key("leftThumbProximal");
__humanoid__humanBones_Serialize_LeftThumbProximal(f, value.LeftThumbProximal);
}
if(value.LeftThumbIntermediate!=null){
f.Key("leftThumbIntermediate");
__humanoid__humanBones_Serialize_LeftThumbIntermediate(f, value.LeftThumbIntermediate);
}
if(value.LeftThumbDistal!=null){
f.Key("leftThumbDistal");
__humanoid__humanBones_Serialize_LeftThumbDistal(f, value.LeftThumbDistal);
@ -441,16 +441,16 @@ public static void __humanoid_Serialize_HumanBones(JsonFormatter f, HumanBones v
__humanoid__humanBones_Serialize_LeftLittleDistal(f, value.LeftLittleDistal);
}
if(value.RightThumbMetacarpal!=null){
f.Key("rightThumbMetacarpal");
__humanoid__humanBones_Serialize_RightThumbMetacarpal(f, value.RightThumbMetacarpal);
}
if(value.RightThumbProximal!=null){
f.Key("rightThumbProximal");
__humanoid__humanBones_Serialize_RightThumbProximal(f, value.RightThumbProximal);
}
if(value.RightThumbIntermediate!=null){
f.Key("rightThumbIntermediate");
__humanoid__humanBones_Serialize_RightThumbIntermediate(f, value.RightThumbIntermediate);
}
if(value.RightThumbDistal!=null){
f.Key("rightThumbDistal");
__humanoid__humanBones_Serialize_RightThumbDistal(f, value.RightThumbDistal);
@ -1094,7 +1094,7 @@ public static void __humanoid__humanBones_Serialize_RightHand(JsonFormatter f, H
f.EndMap();
}
public static void __humanoid__humanBones_Serialize_LeftThumbProximal(JsonFormatter f, HumanBone value)
public static void __humanoid__humanBones_Serialize_LeftThumbMetacarpal(JsonFormatter f, HumanBone value)
{
f.BeginMap();
@ -1117,7 +1117,7 @@ public static void __humanoid__humanBones_Serialize_LeftThumbProximal(JsonFormat
f.EndMap();
}
public static void __humanoid__humanBones_Serialize_LeftThumbIntermediate(JsonFormatter f, HumanBone value)
public static void __humanoid__humanBones_Serialize_LeftThumbProximal(JsonFormatter f, HumanBone value)
{
f.BeginMap();
@ -1439,7 +1439,7 @@ public static void __humanoid__humanBones_Serialize_LeftLittleDistal(JsonFormatt
f.EndMap();
}
public static void __humanoid__humanBones_Serialize_RightThumbProximal(JsonFormatter f, HumanBone value)
public static void __humanoid__humanBones_Serialize_RightThumbMetacarpal(JsonFormatter f, HumanBone value)
{
f.BeginMap();
@ -1462,7 +1462,7 @@ public static void __humanoid__humanBones_Serialize_RightThumbProximal(JsonForma
f.EndMap();
}
public static void __humanoid__humanBones_Serialize_RightThumbIntermediate(JsonFormatter f, HumanBone value)
public static void __humanoid__humanBones_Serialize_RightThumbProximal(JsonFormatter f, HumanBone value)
{
f.BeginMap();

View File

@ -709,111 +709,58 @@ namespace UniVRM10
{
case HumanoidBones.hips: vrm.Humanoid.HumanBones.Hips = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.spine: vrm.Humanoid.HumanBones.Spine = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.chest: vrm.Humanoid.HumanBones.Chest = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.upperChest: vrm.Humanoid.HumanBones.UpperChest = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.neck: vrm.Humanoid.HumanBones.Neck = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.head: vrm.Humanoid.HumanBones.Head = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftEye: vrm.Humanoid.HumanBones.LeftEye = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightEye: vrm.Humanoid.HumanBones.RightEye = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.jaw: vrm.Humanoid.HumanBones.Jaw = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftUpperLeg: vrm.Humanoid.HumanBones.LeftUpperLeg = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftLowerLeg: vrm.Humanoid.HumanBones.LeftLowerLeg = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftFoot: vrm.Humanoid.HumanBones.LeftFoot = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftToes: vrm.Humanoid.HumanBones.LeftToes = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightUpperLeg: vrm.Humanoid.HumanBones.RightUpperLeg = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightLowerLeg: vrm.Humanoid.HumanBones.RightLowerLeg = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightFoot: vrm.Humanoid.HumanBones.RightFoot = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightToes: vrm.Humanoid.HumanBones.RightToes = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftShoulder: vrm.Humanoid.HumanBones.LeftShoulder = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftUpperArm: vrm.Humanoid.HumanBones.LeftUpperArm = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftLowerArm: vrm.Humanoid.HumanBones.LeftLowerArm = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftHand: vrm.Humanoid.HumanBones.LeftHand = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightShoulder: vrm.Humanoid.HumanBones.RightShoulder = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightUpperArm: vrm.Humanoid.HumanBones.RightUpperArm = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightLowerArm: vrm.Humanoid.HumanBones.RightLowerArm = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightHand: vrm.Humanoid.HumanBones.RightHand = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftThumbMetacarpal: vrm.Humanoid.HumanBones.LeftThumbMetacarpal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftThumbProximal: vrm.Humanoid.HumanBones.LeftThumbProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftThumbIntermediate: vrm.Humanoid.HumanBones.LeftThumbIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftThumbDistal: vrm.Humanoid.HumanBones.LeftThumbDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftIndexProximal: vrm.Humanoid.HumanBones.LeftIndexProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftIndexIntermediate: vrm.Humanoid.HumanBones.LeftIndexIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftIndexDistal: vrm.Humanoid.HumanBones.LeftIndexDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftMiddleProximal: vrm.Humanoid.HumanBones.LeftMiddleProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftMiddleIntermediate: vrm.Humanoid.HumanBones.LeftMiddleIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftMiddleDistal: vrm.Humanoid.HumanBones.LeftMiddleDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftRingProximal: vrm.Humanoid.HumanBones.LeftRingProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftRingIntermediate: vrm.Humanoid.HumanBones.LeftRingIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftRingDistal: vrm.Humanoid.HumanBones.LeftRingDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftLittleProximal: vrm.Humanoid.HumanBones.LeftLittleProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftLittleIntermediate: vrm.Humanoid.HumanBones.LeftLittleIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.leftLittleDistal: vrm.Humanoid.HumanBones.LeftLittleDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightThumbMetacarpal: vrm.Humanoid.HumanBones.RightThumbMetacarpal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightThumbProximal: vrm.Humanoid.HumanBones.RightThumbProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightThumbIntermediate: vrm.Humanoid.HumanBones.RightThumbIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightThumbDistal: vrm.Humanoid.HumanBones.RightThumbDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightIndexProximal: vrm.Humanoid.HumanBones.RightIndexProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightIndexIntermediate: vrm.Humanoid.HumanBones.RightIndexIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightIndexDistal: vrm.Humanoid.HumanBones.RightIndexDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightMiddleProximal: vrm.Humanoid.HumanBones.RightMiddleProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightMiddleIntermediate: vrm.Humanoid.HumanBones.RightMiddleIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightMiddleDistal: vrm.Humanoid.HumanBones.RightMiddleDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightRingProximal: vrm.Humanoid.HumanBones.RightRingProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightRingIntermediate: vrm.Humanoid.HumanBones.RightRingIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightRingDistal: vrm.Humanoid.HumanBones.RightRingDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightLittleProximal: vrm.Humanoid.HumanBones.RightLittleProximal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightLittleIntermediate: vrm.Humanoid.HumanBones.RightLittleIntermediate = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
case HumanoidBones.rightLittleDistal: vrm.Humanoid.HumanBones.RightLittleDistal = new UniGLTF.Extensions.VRMC_vrm.HumanBone { Node = i }; break;
}
}

View File

@ -126,8 +126,8 @@ namespace UniVRM10
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftEye, VrmLib.HumanoidBones.leftEye);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightEye, VrmLib.HumanoidBones.rightEye);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.Jaw, VrmLib.HumanoidBones.jaw);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftThumbMetacarpal, VrmLib.HumanoidBones.leftThumbMetacarpal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftThumbProximal, VrmLib.HumanoidBones.leftThumbProximal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftThumbIntermediate, VrmLib.HumanoidBones.leftThumbIntermediate);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftThumbDistal, VrmLib.HumanoidBones.leftThumbDistal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftIndexProximal, VrmLib.HumanoidBones.leftIndexProximal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftIndexIntermediate, VrmLib.HumanoidBones.leftIndexIntermediate);
@ -141,8 +141,8 @@ namespace UniVRM10
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftLittleProximal, VrmLib.HumanoidBones.leftLittleProximal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftLittleIntermediate, VrmLib.HumanoidBones.leftLittleIntermediate);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.LeftLittleDistal, VrmLib.HumanoidBones.leftLittleDistal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightThumbMetacarpal, VrmLib.HumanoidBones.rightThumbMetacarpal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightThumbProximal, VrmLib.HumanoidBones.rightThumbProximal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightThumbIntermediate, VrmLib.HumanoidBones.rightThumbIntermediate);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightThumbDistal, VrmLib.HumanoidBones.rightThumbDistal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightIndexProximal, VrmLib.HumanoidBones.rightIndexProximal);
AssignHumanoid(m_model.Nodes, humanoid.HumanBones.RightIndexIntermediate, VrmLib.HumanoidBones.rightIndexIntermediate);

View File

@ -57,8 +57,8 @@ namespace UniVRM10
case "leftEye": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftEye); break;
case "rightEye": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightEye); break;
case "jaw": CheckBone(boneType, humanoidBone, vrm1.HumanBones.Jaw); break;
case "leftThumbMetacarpal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbMetacarpal); break;
case "leftThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbProximal); break;
case "leftThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbIntermediate); break;
case "leftThumbDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbDistal); break;
case "leftIndexProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftIndexProximal); break;
case "leftIndexIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftIndexIntermediate); break;
@ -72,8 +72,8 @@ namespace UniVRM10
case "leftLittleProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleProximal); break;
case "leftLittleIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleIntermediate); break;
case "leftLittleDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleDistal); break;
case "rightThumbMetacarpal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbMetacarpal); break;
case "rightThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbProximal); break;
case "rightThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbIntermediate); break;
case "rightThumbDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbDistal); break;
case "rightIndexProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightIndexProximal); break;
case "rightIndexIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightIndexIntermediate); break;

View File

@ -70,8 +70,8 @@ namespace UniVRM10
case "leftEye": humanoid.HumanBones.LeftEye = MigrateHumanoidBone(humanoidBone); break;
case "rightEye": humanoid.HumanBones.RightEye = MigrateHumanoidBone(humanoidBone); break;
case "jaw": humanoid.HumanBones.Jaw = MigrateHumanoidBone(humanoidBone); break;
case "leftThumbProximal": humanoid.HumanBones.LeftThumbProximal = MigrateHumanoidBone(humanoidBone); break;
case "leftThumbIntermediate": humanoid.HumanBones.LeftThumbIntermediate = MigrateHumanoidBone(humanoidBone); break;
case "leftThumbProximal": humanoid.HumanBones.LeftThumbMetacarpal = MigrateHumanoidBone(humanoidBone); break;
case "leftThumbIntermediate": humanoid.HumanBones.LeftThumbProximal = MigrateHumanoidBone(humanoidBone); break;
case "leftThumbDistal": humanoid.HumanBones.LeftThumbDistal = MigrateHumanoidBone(humanoidBone); break;
case "leftIndexProximal": humanoid.HumanBones.LeftIndexProximal = MigrateHumanoidBone(humanoidBone); break;
case "leftIndexIntermediate": humanoid.HumanBones.LeftIndexIntermediate = MigrateHumanoidBone(humanoidBone); break;
@ -85,8 +85,8 @@ namespace UniVRM10
case "leftLittleProximal": humanoid.HumanBones.LeftLittleProximal = MigrateHumanoidBone(humanoidBone); break;
case "leftLittleIntermediate": humanoid.HumanBones.LeftLittleIntermediate = MigrateHumanoidBone(humanoidBone); break;
case "leftLittleDistal": humanoid.HumanBones.LeftLittleDistal = MigrateHumanoidBone(humanoidBone); break;
case "rightThumbProximal": humanoid.HumanBones.RightThumbProximal = MigrateHumanoidBone(humanoidBone); break;
case "rightThumbIntermediate": humanoid.HumanBones.RightThumbIntermediate = MigrateHumanoidBone(humanoidBone); break;
case "rightThumbProximal": humanoid.HumanBones.RightThumbMetacarpal = MigrateHumanoidBone(humanoidBone); break;
case "rightThumbIntermediate": humanoid.HumanBones.RightThumbProximal = MigrateHumanoidBone(humanoidBone); break;
case "rightThumbDistal": humanoid.HumanBones.RightThumbDistal = MigrateHumanoidBone(humanoidBone); break;
case "rightIndexProximal": humanoid.HumanBones.RightIndexProximal = MigrateHumanoidBone(humanoidBone); break;
case "rightIndexIntermediate": humanoid.HumanBones.RightIndexIntermediate = MigrateHumanoidBone(humanoidBone); break;
@ -148,8 +148,8 @@ namespace UniVRM10
case "leftEye": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftEye); break;
case "rightEye": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightEye); break;
case "jaw": CheckBone(boneType, humanoidBone, vrm1.HumanBones.Jaw); break;
case "leftThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbProximal); break;
case "leftThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbIntermediate); break;
case "leftThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbMetacarpal); break;
case "leftThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbProximal); break;
case "leftThumbDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftThumbDistal); break;
case "leftIndexProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftIndexProximal); break;
case "leftIndexIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftIndexIntermediate); break;
@ -163,8 +163,8 @@ namespace UniVRM10
case "leftLittleProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleProximal); break;
case "leftLittleIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleIntermediate); break;
case "leftLittleDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.LeftLittleDistal); break;
case "rightThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbProximal); break;
case "rightThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbIntermediate); break;
case "rightThumbProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbMetacarpal); break;
case "rightThumbIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbProximal); break;
case "rightThumbDistal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightThumbDistal); break;
case "rightIndexProximal": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightIndexProximal); break;
case "rightIndexIntermediate": CheckBone(boneType, humanoidBone, vrm1.HumanBones.RightIndexIntermediate); break;

View File

@ -78,9 +78,17 @@ namespace VrmLib
public Node Distal;
}
struct HumanoidThumbnail
{
public Node Metacarpal;
public Node Proximal;
public Node Distal;
}
struct HumanoidFingers
{
public HumanoidFinger Thumb;
public HumanoidThumbnail Thumb;
public HumanoidFinger Index;
public HumanoidFinger Middle;
public HumanoidFinger Ring;
@ -294,8 +302,8 @@ namespace VrmLib
case HumanoidBones.rightFoot: RightLeg.Foot = node; break;
case HumanoidBones.rightToes: RightLeg.Toe = node; break;
case HumanoidBones.leftThumbMetacarpal: LeftFingers.Thumb.Metacarpal = node; break;
case HumanoidBones.leftThumbProximal: LeftFingers.Thumb.Proximal = node; break;
case HumanoidBones.leftThumbIntermediate: LeftFingers.Thumb.Intermediate = node; break;
case HumanoidBones.leftThumbDistal: LeftFingers.Thumb.Distal = node; break;
case HumanoidBones.leftIndexProximal: LeftFingers.Index.Proximal = node; break;
case HumanoidBones.leftIndexIntermediate: LeftFingers.Index.Intermediate = node; break;
@ -310,8 +318,8 @@ namespace VrmLib
case HumanoidBones.leftLittleIntermediate: LeftFingers.Little.Intermediate = node; break;
case HumanoidBones.leftLittleDistal: LeftFingers.Little.Distal = node; break;
case HumanoidBones.rightThumbMetacarpal: RightFingers.Thumb.Metacarpal = node; break;
case HumanoidBones.rightThumbProximal: RightFingers.Thumb.Proximal = node; break;
case HumanoidBones.rightThumbIntermediate: RightFingers.Thumb.Intermediate = node; break;
case HumanoidBones.rightThumbDistal: RightFingers.Thumb.Distal = node; break;
case HumanoidBones.rightIndexProximal: RightFingers.Index.Proximal = node; break;
case HumanoidBones.rightIndexIntermediate: RightFingers.Index.Intermediate = node; break;
@ -410,8 +418,8 @@ namespace VrmLib
case HumanoidBones.rightFoot: value = RightLeg.Foot; return true;
case HumanoidBones.rightToes: value = RightLeg.Toe; return true;
case HumanoidBones.leftThumbMetacarpal: value = LeftFingers.Thumb.Metacarpal; return true;
case HumanoidBones.leftThumbProximal: value = LeftFingers.Thumb.Proximal; return true;
case HumanoidBones.leftThumbIntermediate: value = LeftFingers.Thumb.Intermediate; return true;
case HumanoidBones.leftThumbDistal: value = LeftFingers.Thumb.Distal; return true;
case HumanoidBones.leftIndexProximal: value = LeftFingers.Index.Proximal; return true;
case HumanoidBones.leftIndexIntermediate: value = LeftFingers.Index.Intermediate; return true;
@ -427,7 +435,7 @@ namespace VrmLib
case HumanoidBones.leftLittleDistal: value = LeftFingers.Little.Distal; return true;
case HumanoidBones.rightThumbProximal: value = LeftFingers.Thumb.Proximal; return true;
case HumanoidBones.rightThumbIntermediate: value = LeftFingers.Thumb.Intermediate; return true;
case HumanoidBones.rightThumbMetacarpal: value = LeftFingers.Thumb.Metacarpal; return true;
case HumanoidBones.rightThumbDistal: value = LeftFingers.Thumb.Distal; return true;
case HumanoidBones.rightIndexProximal: value = LeftFingers.Index.Proximal; return true;
case HumanoidBones.rightIndexIntermediate: value = LeftFingers.Index.Intermediate; return true;

View File

@ -68,8 +68,8 @@ namespace VrmLib
jaw,
#region fingers
leftThumbMetacarpal,
leftThumbProximal,
leftThumbIntermediate,
leftThumbDistal,
leftIndexProximal,
leftIndexIntermediate,
@ -83,8 +83,8 @@ namespace VrmLib
leftLittleProximal,
leftLittleIntermediate,
leftLittleDistal,
rightThumbMetacarpal,
rightThumbProximal,
rightThumbIntermediate,
rightThumbDistal,
rightIndexProximal,
rightIndexIntermediate,