Beispiel #1
0
 public override void OnInspectorGUI()
 {
     EditorGUIUtility.labelWidth = 160;
     serializedObject.Update();
     m_forceTPose.Draw();
     m_poseFreeze.Draw();
     m_useSparseAccessor.Draw();
     m_onlyBlendShapePosition.Draw();
     m_reduceBlendShape.Draw();
     m_reduceBlendShapeClip.Draw();
     serializedObject.ApplyModifiedProperties();
 }
Beispiel #2
0
 public override void OnInspectorGUI()
 {
     serializedObject.Update();
     m_forceTPose.Draw();
     m_poseFreeze.Draw();
     m_useExcperimentalExporter.Draw();
     m_useSparseAccessor.Draw();
     m_onlyBlendShapePosition.Draw();
     m_reduceBlendShape.Draw();
     m_reduceBlendShapeClip.Draw();
     m_removeVertexColor.Draw();
     serializedObject.ApplyModifiedProperties();
 }
Beispiel #3
0
        public override void OnInspectorGUI()
        {
            GUILayout.Space(20);
            var settings = (VRMExportSettings)target;
            var root     = settings.Root;

            // ToDo: 任意の BlendShapeClip を適用する

            EditorGUIUtility.labelWidth = 160;
            serializedObject.Update();
            m_poseFreeze.Draw();
            m_useSparseAccessor.Draw();
            m_onlyBlendShapePosition.Draw();
            m_reduceBlendShape.Draw();
            m_reduceBlendShapeClip.Draw();
            m_divideVertexBuffer.Draw();

            serializedObject.ApplyModifiedProperties();
        }
Beispiel #4
0
        public override void OnInspectorGUI()
        {
            GUILayout.Space(20);
            var settings = (VRMExportSettings)target;
            var root     = settings.Root;
            var backup   = GUI.enabled;

            GUI.enabled = root.scene.IsValid();
            if (GUI.enabled)
            {
                EditorGUILayout.HelpBox(Options.ENALBE_TPOSE_BUTTON.Msg(), MessageType.Info);
            }
            else
            {
                EditorGUILayout.HelpBox(Options.DISABLE_TPOSE_BUTTON.Msg(), MessageType.Warning);
            }
            if (GUILayout.Button(Options.DO_TPOSE.Msg()))
            {
                if (settings.Root)
                {
                    VRMBoneNormalizer.EnforceTPose(settings.Root);
                }
            }
            GUI.enabled = backup;
            GUILayout.Space(20);

            // ToDo: 任意の BlendShapeClip を適用する

            EditorGUIUtility.labelWidth = 160;
            serializedObject.Update();
            m_poseFreeze.Draw();
            m_useSparseAccessor.Draw();
            m_onlyBlendShapePosition.Draw();
            m_reduceBlendShape.Draw();
            m_reduceBlendShapeClip.Draw();
            m_divideVertexBuffer.Draw();

            serializedObject.ApplyModifiedProperties();
        }
Beispiel #5
0
        public override void OnInspectorGUI()
        {
            GUILayout.Space(20);
            var settings = (VRMExportSettings)target;
            var root     = settings.Root;
            var backup   = GUI.enabled;

            GUI.enabled = root.scene.IsValid();
            if (GUI.enabled)
            {
                EditorGUILayout.HelpBox(Options.ENALBE_TPOSE_BUTTON.Msg(), MessageType.Info);
            }
            else
            {
                EditorGUILayout.HelpBox(Options.DISABLE_TPOSE_BUTTON.Msg(), MessageType.Warning);
            }

            //
            // T-Pose
            //
            if (GUILayout.Button(VRMExportSettingsEditor.Options.DO_TPOSE.Msg()))
            {
                if (settings.Root != null)
                {
                    // fallback
                    Undo.RecordObjects(settings.Root.GetComponentsInChildren <Transform>(), "tpose");
                    VRMBoneNormalizer.EnforceTPose(settings.Root);
                }
            }

            if (GUILayout.Button(VRMExportSettingsEditor.Options.DO_TPOSE.Msg() + "(unity internal)"))
            {
                if (settings.Root != null)
                {
                    Undo.RecordObjects(settings.Root.GetComponentsInChildren <Transform>(), "tpose.internal");
                    if (InternalTPose.TryMakePoseValid(settings.Root))
                    {
                        // done
                    }
                    else
                    {
                        Debug.LogWarning("not found");
                    }
                }
            }

            GUI.enabled = backup;
            GUILayout.Space(20);

            // ToDo: 任意の BlendShapeClip を適用する

            EditorGUIUtility.labelWidth = 160;
            serializedObject.Update();
            m_poseFreeze.Draw();
            m_useSparseAccessor.Draw();
            m_onlyBlendShapePosition.Draw();
            m_reduceBlendShape.Draw();
            m_reduceBlendShapeClip.Draw();
            m_divideVertexBuffer.Draw();

            serializedObject.ApplyModifiedProperties();
        }