public void ApplyPose(CanonicalPose pose, CanonicalRepresentation.HAnimBones[] bones) { if (pose != null) { rig.ApplyPose(pose, bones); } }
public void ApplyPose(CanonicalPose pose) { if (pose != null) { rig.ApplyPose(pose); } }
public CanonicalPoseClip ExportClip(AnimationClip clip, int fps) { List <CanonicalPose> _frames = new List <CanonicalPose>(); float delta = 1.0f / (float)fps; IPriorityApply[] appliers = (GetComponents <IPriorityApply>()).OrderByDescending(a => a.GetPriority()).ToArray(); for (int frame = 0; frame < Mathf.Max(1f, clip.length * fps); frame++) { float t = delta * frame; if (ikDrivingAnimator == null) { clip.SampleAnimation(transform.gameObject, t); } else { //if (fbbik_head != null) fbbik_head.; clip.SampleAnimation(ikDrivingAnimator.gameObject, t); } foreach (IPriorityApply a in appliers) { a.Apply(); } CanonicalPose p = ExportPose(); p.timestamp = t; _frames.Add(p); } return(new CanonicalPoseClip(_frames.ToArray())); }