public BBFacePose Draw(BBFacePose targetPose, BBLipSync lipSync, BBLipSyncInspector inspector)
        {
            if (targetPose == null)
            {
                targetPose = new BBFacePose()
                {
                    BonePoses = new List <BBBonePose>()
                };
            }
            if (targetPose != createdPose)
            {
                targetPose.BonePoses.ForEach(bonePose =>
                {
                    if (bonePose != null && bonePose.BoneTransform != null)
                    {
                        bonePose.BoneTransform.localPosition = bonePose.LocalPosition;
                        bonePose.BoneTransform.localRotation = bonePose.LocalRotation;
                    }
                });
            }
            createdPose    = targetPose;
            this.inspector = inspector;
            ownerLipSync   = lipSync;
            DrawPosingInterface();

            DisplayPoseOnModel();

            return(targetPose);
        }
 public BBGetDefaultPoseWindow Init(BBLipSyncInspector lipSyncInspector)
 {
     lipSync = lipSyncInspector.TargetLipSync;
     this.lipSyncInspector = lipSyncInspector;
     retrievedPose         = lipSync.DefaultPose;
     realArmatureRoot      = lipSync.DefaultPose != null ? lipSync.DefaultPose.Root : null;
     return(this);
 }
Ejemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            lipSync = (BBLipSync)target;
            DrawGeneralSettings();

            if (EditorApplication.isPlaying)
            {
                DrawLivePreview();
            }
            DrawEmotionsSettings();
            DrawLipSyncPoseSettings();

            EditorUtility.SetDirty(lipSync);
        }