Exemple #1
0
        public static void ExpressionsInspector(FaceTarget faceTarget)
        {
            EditorGUILayout.BeginHorizontal();
            showExpressions = EditorGUILayout.Foldout(showExpressions, "Expression", true);

            EditorGUI.indentLevel++;
            string[] poseNames = faceTarget.poseMixer.GetPoseNames();
            int      poseIx    = EditorGUILayout.Popup(faceTarget.pose, poseNames);

            if (poseIx != faceTarget.pose)
            {
                faceTarget.pose = poseIx;
                faceTarget.poseMixer.SetPoseValue(poseIx);
            }
            EditorGUI.indentLevel--;
            EditorGUILayout.EndHorizontal();

            if (showExpressions)
            {
                EditorGUI.indentLevel++;
                Pose_Editor.PoseMixerInspector(faceTarget.poseMixer, faceTarget.headTarget.humanoid);
                EditorGUI.indentLevel--;
            }

            if (!Application.isPlaying)
            {
                faceTarget.poseMixer.ShowPose(faceTarget.headTarget.humanoid);
                faceTarget.UpdateMovements();
                SceneView.RepaintAll();
            }
        }
Exemple #2
0
        /// <summary>Updates the avatar bones based on the current target rig</summary>
        public override void UpdateMovements(HumanoidControl humanoid)
        {
            if (humanoid.calculateBodyPose)
            {
                HeadMovements.Update(this);
#if hFACE
                face.UpdateMovements();
#endif
            }
        }