mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-20 09:47:56 -05:00
impl VrmAnimationExporter for bvh
This commit is contained in:
parent
709387fb12
commit
16ff381cdc
|
|
@ -1,10 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UniGLTF;
|
||||
using UniGLTF.Extensions.VRMC_vrm_animation;
|
||||
using UniHumanoid;
|
||||
using UniJSON;
|
||||
using UnityEngine;
|
||||
using VRMShaders;
|
||||
|
||||
|
|
@ -15,9 +14,11 @@ namespace UniVRM10
|
|||
public VrmAnimationExporter(
|
||||
ExportingGltfData data,
|
||||
GltfExportSettings settings)
|
||||
: base(data, settings) { }
|
||||
: base(data, settings)
|
||||
{
|
||||
settings.InverseAxis = Axes.X;
|
||||
}
|
||||
|
||||
// private (INormalizedPoseProvider, ITPoseProvider) m_controlRig;
|
||||
readonly List<float> m_times = new();
|
||||
|
||||
class PositionExporter
|
||||
|
|
@ -34,7 +35,9 @@ namespace UniVRM10
|
|||
|
||||
public void Add()
|
||||
{
|
||||
Values.Add(m_root.worldToLocalMatrix.MultiplyPoint(Node.position));
|
||||
var p = m_root.worldToLocalMatrix.MultiplyPoint(Node.position);
|
||||
// reverse-X
|
||||
Values.Add(new Vector3(-p.x, p.y, p.z));
|
||||
}
|
||||
}
|
||||
PositionExporter m_position;
|
||||
|
|
@ -42,7 +45,7 @@ namespace UniVRM10
|
|||
class RotationExporter
|
||||
{
|
||||
public List<Quaternion> Values = new();
|
||||
readonly Transform Node;
|
||||
public readonly Transform Node;
|
||||
public Transform m_parent;
|
||||
|
||||
public RotationExporter(Transform bone, Transform parent)
|
||||
|
|
@ -53,7 +56,9 @@ namespace UniVRM10
|
|||
|
||||
public void Add()
|
||||
{
|
||||
Values.Add(Quaternion.Inverse(m_parent.rotation) * Node.rotation);
|
||||
var q = Quaternion.Inverse(m_parent.rotation) * Node.rotation;
|
||||
// reverse-X
|
||||
Values.Add(new Quaternion(q.x, -q.y, -q.z, q.w));
|
||||
}
|
||||
}
|
||||
readonly Dictionary<HumanBodyBones, RotationExporter> m_rotations = new();
|
||||
|
|
@ -145,6 +150,10 @@ namespace UniVRM10
|
|||
};
|
||||
_data.Gltf.animations.Add(gltfAnimation);
|
||||
|
||||
// this.Nodes には 右手左手変換後のコピーが入っている
|
||||
// 代替として名前で逆引きする
|
||||
var names = Nodes.Select(x => x.name).ToList();
|
||||
|
||||
// time values
|
||||
var input = _data.ExtendBufferAndGetAccessorIndex(m_times.ToArray());
|
||||
|
||||
|
|
@ -163,7 +172,7 @@ namespace UniVRM10
|
|||
sampler = sampler,
|
||||
target = new glTFAnimationTarget
|
||||
{
|
||||
node = Nodes.IndexOf(m_position.Node),
|
||||
node = names.IndexOf(m_position.Node.name),
|
||||
path = "translation",
|
||||
},
|
||||
});
|
||||
|
|
@ -185,14 +194,14 @@ namespace UniVRM10
|
|||
sampler = sampler,
|
||||
target = new glTFAnimationTarget
|
||||
{
|
||||
node = Nodes.IndexOf(m_position.Node),
|
||||
node = names.IndexOf(kv.Value.Node.name),
|
||||
path = "rotation",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// VRMC_vrm_animation
|
||||
var vrmAnimation = VrmAnimationUtil.Create(map, Nodes);
|
||||
var vrmAnimation = VrmAnimationUtil.Create(map, names);
|
||||
UniGLTF.Extensions.VRMC_vrm_animation.GltfSerializer.SerializeTo(
|
||||
ref _data.Gltf.extensions
|
||||
, vrmAnimation);
|
||||
|
|
@ -205,13 +214,11 @@ namespace UniVRM10
|
|||
bvh.Load();
|
||||
|
||||
var data = new ExportingGltfData();
|
||||
using (var exporter = new VrmAnimationExporter(
|
||||
data, new GltfExportSettings()))
|
||||
{
|
||||
exporter.Prepare(bvh.Root.gameObject);
|
||||
exporter.Export(bvh);
|
||||
return data.ToGlbBytes();
|
||||
}
|
||||
using var exporter = new VrmAnimationExporter(
|
||||
data, new GltfExportSettings());
|
||||
exporter.Prepare(bvh.Root.gameObject);
|
||||
exporter.Export(bvh);
|
||||
return data.ToGlbBytes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace UniVRM10
|
|||
{
|
||||
public static VRMC_vrm_animation Create(
|
||||
Dictionary<UnityEngine.HumanBodyBones, UnityEngine.Transform> map,
|
||||
List<UnityEngine.Transform> nodes)
|
||||
List<string> names)
|
||||
{
|
||||
var vrmAnimation = new VRMC_vrm_animation
|
||||
{
|
||||
|
|
@ -20,59 +20,59 @@ namespace UniVRM10
|
|||
{
|
||||
switch (kv.Key)
|
||||
{
|
||||
case UnityEngine.HumanBodyBones.Hips: vrmAnimation.Humanoid.HumanBones.Hips = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftUpperLeg: vrmAnimation.Humanoid.HumanBones.LeftUpperLeg = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightUpperLeg: vrmAnimation.Humanoid.HumanBones.RightUpperLeg = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLowerLeg: vrmAnimation.Humanoid.HumanBones.LeftLowerLeg = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLowerLeg: vrmAnimation.Humanoid.HumanBones.RightLowerLeg = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftFoot: vrmAnimation.Humanoid.HumanBones.LeftFoot = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightFoot: vrmAnimation.Humanoid.HumanBones.RightFoot = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Spine: vrmAnimation.Humanoid.HumanBones.Spine = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Chest: vrmAnimation.Humanoid.HumanBones.Chest = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.UpperChest: vrmAnimation.Humanoid.HumanBones.UpperChest = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Neck: vrmAnimation.Humanoid.HumanBones.Neck = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Head: vrmAnimation.Humanoid.HumanBones.Head = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftShoulder: vrmAnimation.Humanoid.HumanBones.LeftShoulder = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightShoulder: vrmAnimation.Humanoid.HumanBones.RightShoulder = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftUpperArm: vrmAnimation.Humanoid.HumanBones.LeftUpperArm = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightUpperArm: vrmAnimation.Humanoid.HumanBones.RightUpperArm = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLowerArm: vrmAnimation.Humanoid.HumanBones.LeftLowerArm = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLowerArm: vrmAnimation.Humanoid.HumanBones.RightLowerArm = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftHand: vrmAnimation.Humanoid.HumanBones.LeftHand = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightHand: vrmAnimation.Humanoid.HumanBones.RightHand = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftToes: vrmAnimation.Humanoid.HumanBones.LeftToes = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightToes: vrmAnimation.Humanoid.HumanBones.RightToes = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Jaw: vrmAnimation.Humanoid.HumanBones.Jaw = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbProximal: vrmAnimation.Humanoid.HumanBones.LeftThumbMetacarpal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbIntermediate: vrmAnimation.Humanoid.HumanBones.LeftThumbProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbDistal: vrmAnimation.Humanoid.HumanBones.LeftThumbDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexProximal: vrmAnimation.Humanoid.HumanBones.LeftIndexProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexIntermediate: vrmAnimation.Humanoid.HumanBones.LeftIndexIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexDistal: vrmAnimation.Humanoid.HumanBones.LeftIndexDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleProximal: vrmAnimation.Humanoid.HumanBones.LeftMiddleProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleIntermediate: vrmAnimation.Humanoid.HumanBones.LeftMiddleIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleDistal: vrmAnimation.Humanoid.HumanBones.LeftMiddleDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingProximal: vrmAnimation.Humanoid.HumanBones.LeftRingProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingIntermediate: vrmAnimation.Humanoid.HumanBones.LeftRingIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingDistal: vrmAnimation.Humanoid.HumanBones.LeftRingDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleProximal: vrmAnimation.Humanoid.HumanBones.LeftLittleProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleIntermediate: vrmAnimation.Humanoid.HumanBones.LeftLittleIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleDistal: vrmAnimation.Humanoid.HumanBones.LeftLittleDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbProximal: vrmAnimation.Humanoid.HumanBones.RightThumbMetacarpal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbIntermediate: vrmAnimation.Humanoid.HumanBones.RightThumbProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbDistal: vrmAnimation.Humanoid.HumanBones.RightThumbDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexProximal: vrmAnimation.Humanoid.HumanBones.RightIndexProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexIntermediate: vrmAnimation.Humanoid.HumanBones.RightIndexIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexDistal: vrmAnimation.Humanoid.HumanBones.RightIndexDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleProximal: vrmAnimation.Humanoid.HumanBones.RightMiddleProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleIntermediate: vrmAnimation.Humanoid.HumanBones.RightMiddleIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleDistal: vrmAnimation.Humanoid.HumanBones.RightMiddleDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingProximal: vrmAnimation.Humanoid.HumanBones.RightRingProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingIntermediate: vrmAnimation.Humanoid.HumanBones.RightRingIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingDistal: vrmAnimation.Humanoid.HumanBones.RightRingDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleProximal: vrmAnimation.Humanoid.HumanBones.RightLittleProximal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleIntermediate: vrmAnimation.Humanoid.HumanBones.RightLittleIntermediate = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleDistal: vrmAnimation.Humanoid.HumanBones.RightLittleDistal = new HumanBone { Node = nodes.IndexOf(kv.Value) }; break;
|
||||
case UnityEngine.HumanBodyBones.Hips: vrmAnimation.Humanoid.HumanBones.Hips = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftUpperLeg: vrmAnimation.Humanoid.HumanBones.LeftUpperLeg = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightUpperLeg: vrmAnimation.Humanoid.HumanBones.RightUpperLeg = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLowerLeg: vrmAnimation.Humanoid.HumanBones.LeftLowerLeg = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLowerLeg: vrmAnimation.Humanoid.HumanBones.RightLowerLeg = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftFoot: vrmAnimation.Humanoid.HumanBones.LeftFoot = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightFoot: vrmAnimation.Humanoid.HumanBones.RightFoot = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.Spine: vrmAnimation.Humanoid.HumanBones.Spine = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.Chest: vrmAnimation.Humanoid.HumanBones.Chest = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.UpperChest: vrmAnimation.Humanoid.HumanBones.UpperChest = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.Neck: vrmAnimation.Humanoid.HumanBones.Neck = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.Head: vrmAnimation.Humanoid.HumanBones.Head = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftShoulder: vrmAnimation.Humanoid.HumanBones.LeftShoulder = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightShoulder: vrmAnimation.Humanoid.HumanBones.RightShoulder = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftUpperArm: vrmAnimation.Humanoid.HumanBones.LeftUpperArm = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightUpperArm: vrmAnimation.Humanoid.HumanBones.RightUpperArm = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLowerArm: vrmAnimation.Humanoid.HumanBones.LeftLowerArm = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLowerArm: vrmAnimation.Humanoid.HumanBones.RightLowerArm = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftHand: vrmAnimation.Humanoid.HumanBones.LeftHand = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightHand: vrmAnimation.Humanoid.HumanBones.RightHand = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftToes: vrmAnimation.Humanoid.HumanBones.LeftToes = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightToes: vrmAnimation.Humanoid.HumanBones.RightToes = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.Jaw: vrmAnimation.Humanoid.HumanBones.Jaw = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbProximal: vrmAnimation.Humanoid.HumanBones.LeftThumbMetacarpal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbIntermediate: vrmAnimation.Humanoid.HumanBones.LeftThumbProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftThumbDistal: vrmAnimation.Humanoid.HumanBones.LeftThumbDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexProximal: vrmAnimation.Humanoid.HumanBones.LeftIndexProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexIntermediate: vrmAnimation.Humanoid.HumanBones.LeftIndexIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftIndexDistal: vrmAnimation.Humanoid.HumanBones.LeftIndexDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleProximal: vrmAnimation.Humanoid.HumanBones.LeftMiddleProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleIntermediate: vrmAnimation.Humanoid.HumanBones.LeftMiddleIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftMiddleDistal: vrmAnimation.Humanoid.HumanBones.LeftMiddleDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingProximal: vrmAnimation.Humanoid.HumanBones.LeftRingProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingIntermediate: vrmAnimation.Humanoid.HumanBones.LeftRingIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftRingDistal: vrmAnimation.Humanoid.HumanBones.LeftRingDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleProximal: vrmAnimation.Humanoid.HumanBones.LeftLittleProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleIntermediate: vrmAnimation.Humanoid.HumanBones.LeftLittleIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.LeftLittleDistal: vrmAnimation.Humanoid.HumanBones.LeftLittleDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbProximal: vrmAnimation.Humanoid.HumanBones.RightThumbMetacarpal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbIntermediate: vrmAnimation.Humanoid.HumanBones.RightThumbProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightThumbDistal: vrmAnimation.Humanoid.HumanBones.RightThumbDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexProximal: vrmAnimation.Humanoid.HumanBones.RightIndexProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexIntermediate: vrmAnimation.Humanoid.HumanBones.RightIndexIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightIndexDistal: vrmAnimation.Humanoid.HumanBones.RightIndexDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleProximal: vrmAnimation.Humanoid.HumanBones.RightMiddleProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleIntermediate: vrmAnimation.Humanoid.HumanBones.RightMiddleIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightMiddleDistal: vrmAnimation.Humanoid.HumanBones.RightMiddleDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingProximal: vrmAnimation.Humanoid.HumanBones.RightRingProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingIntermediate: vrmAnimation.Humanoid.HumanBones.RightRingIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightRingDistal: vrmAnimation.Humanoid.HumanBones.RightRingDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleProximal: vrmAnimation.Humanoid.HumanBones.RightLittleProximal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleIntermediate: vrmAnimation.Humanoid.HumanBones.RightLittleIntermediate = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
case UnityEngine.HumanBodyBones.RightLittleDistal: vrmAnimation.Humanoid.HumanBones.RightLittleDistal = new HumanBone { Node = names.IndexOf(kv.Value.name) }; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user