public SerializedBlendShapeEditor(BlendShapeClip blendShapeClip,
                                   PreviewSceneManager previewSceneManager, EditorStatus status) : this(
         new SerializedObject(blendShapeClip), blendShapeClip, previewSceneManager, status)
 {
 }
        public bool Draw(out BlendShapeClip bakeValue)
        {
            m_changed = false;

            m_serializedObject.Update();

            // Readonly のBlendShapeClip参照
            GUI.enabled = false;
            EditorGUILayout.ObjectField("Current clip",
                                        m_targetObject, typeof(BlendShapeClip), false);
            GUI.enabled = true;

            EditorGUILayout.PropertyField(m_blendShapeNameProp, true);
            EditorGUILayout.PropertyField(m_presetProp, true);

            m_status.BlendShapeFoldout = CustomUI.Foldout(Status.BlendShapeFoldout, "BlendShape");
            if (Status.BlendShapeFoldout)
            {
                EditorGUI.indentLevel++;
                var changed = BlendShapeBindsGUI();
                if (changed)
                {
                    string maxWeightName;
                    var    bindings = GetBindings(out maxWeightName);
                    m_blendShapeBindings.SetValues(bindings);

                    m_changed = true;
                }
                EditorGUI.indentLevel--;
            }

            m_status.AdvancedFoldout = CustomUI.Foldout(Status.AdvancedFoldout, "Advanced");
            if (Status.AdvancedFoldout)
            {
                EditorGUI.indentLevel++;

                // v0.45 Added. Binary flag
                EditorGUILayout.PropertyField(m_isBinaryProp, true);

                // v1.0 Ignore State
                EditorGUILayout.PropertyField(m_ignoreBlinkProp, true);
                EditorGUILayout.PropertyField(m_ignoreLookAtProp, true);
                EditorGUILayout.PropertyField(m_ignoreMouthProp, true);

                EditorGUILayout.Space();
                m_status.Mode = GUILayout.Toolbar(Status.Mode, MODES);
                switch (Status.Mode)
                {
                case 0:
                    // BlendShape
                {
                    if (m_blendShapeBindings.Draw())
                    {
                        m_changed = true;
                    }
                }
                break;

                case 1:
                    // Material
                {
                    if (m_materialColorBindings.Draw())
                    {
                        m_changed = true;
                    }
                }
                break;

                case 2:
                    // MaterialUV
                {
                    if (m_materialUVBindings.Draw())
                    {
                        m_changed = true;
                    }
                }
                break;
                }

                EditorGUI.indentLevel--;
            }

            m_serializedObject.ApplyModifiedProperties();

            bakeValue = m_targetObject;
            return(m_changed);
        }
        protected override void OnEnable()
        {
            m_target = (BlendShapeClip)target;

            base.OnEnable();
        }