mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 06:19:47 -05:00
Remove thumbnail
This commit is contained in:
parent
3e3e4070cf
commit
b879ce8a4a
|
|
@ -92,7 +92,7 @@ namespace VRM
|
|||
[SerializeField]
|
||||
public bool IsBinary;
|
||||
|
||||
[SerializeField]
|
||||
public Texture2D Thumbnail;
|
||||
// [SerializeField]
|
||||
// public Texture2D Thumbnail;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user