diff --git a/Scripts/BlendShape/BlendShapeClip.cs b/Scripts/BlendShape/BlendShapeClip.cs index 96253b651..4b883fdc4 100644 --- a/Scripts/BlendShape/BlendShapeClip.cs +++ b/Scripts/BlendShape/BlendShapeClip.cs @@ -92,7 +92,7 @@ namespace VRM [SerializeField] public bool IsBinary; - [SerializeField] - public Texture2D Thumbnail; + // [SerializeField] + // public Texture2D Thumbnail; } } diff --git a/Scripts/BlendShape/Editor/BlendShapeClipDrawer.cs b/Scripts/BlendShape/Editor/BlendShapeClipDrawer.cs index 6b1da8820..a8dec2adb 100644 --- a/Scripts/BlendShape/Editor/BlendShapeClipDrawer.cs +++ b/Scripts/BlendShape/Editor/BlendShapeClipDrawer.cs @@ -10,9 +10,12 @@ namespace VRM [CustomPropertyDrawer(typeof(BlendShapeClip))] public class BlendShapeClipDrawer : PropertyDrawer { - public const int Height = 132; + //public const int Height = 132; - public const int ThumbnailSize = 128; + //public const int ThumbnailSize = 128; + + public const int Height = 80; + public const int ThumbnailSize = 0; public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) @@ -32,16 +35,18 @@ namespace VRM if (clip != null) { var clipObj = new SerializedObject(clip); - var thumbnail = clipObj.FindProperty("Thumbnail"); + //var thumbnail = clipObj.FindProperty("Thumbnail"); var blendShapeName = clipObj.FindProperty("BlendShapeName"); var preset = clipObj.FindProperty("Preset"); var isBinary = clipObj.FindProperty("IsBinary"); + /* EditorGUI.ObjectField(new Rect(position) { width = ThumbnailSize, height = ThumbnailSize }, thumbnail.objectReferenceValue, typeof(Texture), false); + */ rect.y += (EditorGUIUtility.singleLineHeight + 2); EditorGUI.PropertyField(rect, blendShapeName); diff --git a/Scripts/BlendShape/Editor/BlendShapeClipEditor.cs b/Scripts/BlendShape/Editor/BlendShapeClipEditor.cs index 125f625d6..5af9097f5 100644 --- a/Scripts/BlendShape/Editor/BlendShapeClipEditor.cs +++ b/Scripts/BlendShape/Editor/BlendShapeClipEditor.cs @@ -24,7 +24,7 @@ namespace VRM }; } - SerializedProperty m_thumbnailProp; + //SerializedProperty m_thumbnailProp; SerializedProperty m_isBinaryProp; protected override GameObject GetPrefab() @@ -91,12 +91,13 @@ namespace VRM if (m_serializedEditor == null) { m_serializedEditor = new SerializedBlendShapeEditor(serializedObject, PreviewSceneManager); - m_thumbnailProp = serializedObject.FindProperty("Thumbnail"); + //m_thumbnailProp = serializedObject.FindProperty("Thumbnail"); m_isBinaryProp = serializedObject.FindProperty("IsBinary"); } int thumbnailSize = 96; EditorGUILayout.BeginHorizontal(); + /* var objectReferenceValue = EditorGUILayout.ObjectField(m_thumbnailProp.objectReferenceValue, typeof(Texture), false, GUILayout.Width(thumbnailSize), GUILayout.Height(thumbnailSize)); if (m_thumbnailProp.objectReferenceValue != objectReferenceValue) @@ -104,6 +105,7 @@ namespace VRM m_thumbnailProp.objectReferenceValue = objectReferenceValue; serializedObject.ApplyModifiedProperties(); } + */ var changed = false; EditorGUILayout.BeginVertical(); @@ -111,6 +113,7 @@ namespace VRM EditorGUILayout.LabelField("Preview Weight"); var previewSlider = EditorGUILayout.Slider(m_previewSlider, 0, 1.0f); GUI.enabled = PreviewTexture != null; + /* if (GUILayout.Button("save thumbnail")) { //var ext = "jpg"; @@ -129,6 +132,7 @@ namespace VRM serializedObject.ApplyModifiedProperties(); } } + */ GUI.enabled = true; EditorGUILayout.EndVertical(); diff --git a/Scripts/BlendShape/Editor/SerializedBlendShapeClipEditor.cs b/Scripts/BlendShape/Editor/SerializedBlendShapeClipEditor.cs index 0390b5c3d..7d21c8341 100644 --- a/Scripts/BlendShape/Editor/SerializedBlendShapeClipEditor.cs +++ b/Scripts/BlendShape/Editor/SerializedBlendShapeClipEditor.cs @@ -66,7 +66,7 @@ namespace VRM this.m_serializedObject = serializedObject; this.m_targetObject = targetObject; - m_thumbnail = serializedObject.FindProperty("Thumbnail"); + //m_thumbnail = serializedObject.FindProperty("Thumbnail"); m_blendShapeNameProp = serializedObject.FindProperty("BlendShapeName"); m_presetProp = serializedObject.FindProperty("Preset"); m_isBinaryProp = serializedObject.FindProperty("IsBinary"); diff --git a/Scripts/Meta/Editor/VRMMetaEditor.cs b/Scripts/Meta/Editor/VRMMetaEditor.cs index b5e861d22..6e90bb5db 100644 --- a/Scripts/Meta/Editor/VRMMetaEditor.cs +++ b/Scripts/Meta/Editor/VRMMetaEditor.cs @@ -70,12 +70,12 @@ namespace VRM } bool m_foldoutInfo = true; - bool m_foldoutPersmission=true; - bool m_foldoutDistribution=true; + bool m_foldoutPersmission = true; + bool m_foldoutDistribution = true; void VRMMetaObjectGUI(SerializedObject so) { InitMap(so); - if (m_propMap == null || m_propMap.Count==0) return; + if (m_propMap == null || m_propMap.Count == 0) return; so.Update(); @@ -95,8 +95,8 @@ namespace VRM EditorGUILayout.PropertyField(m_propMap["Author"]); EditorGUILayout.PropertyField(m_propMap["ContactInformation"]); EditorGUILayout.PropertyField(m_propMap["Reference"]); - var thumbnail = m_propMap["Thumbnail"]; - thumbnail.objectReferenceValue = TextureField("", (Texture2D)thumbnail.objectReferenceValue, 100); + //var thumbnail = m_propMap["Thumbnail"]; + //thumbnail.objectReferenceValue = TextureField("", (Texture2D)thumbnail.objectReferenceValue, 100); } EditorGUILayout.LabelField("License ", EditorStyles.boldLabel); @@ -121,7 +121,7 @@ namespace VRM EditorGUILayout.PropertyField(m_propMap["OtherLicenseUrl"]); } } - + so.ApplyModifiedProperties(); }