mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-06-03 06:24:46 -05:00
OnLayout
This commit is contained in:
parent
8e8ee5cf65
commit
da41a5cc67
|
|
@ -91,6 +91,10 @@ namespace UniGLTF
|
|||
|
||||
protected abstract bool DoGUI();
|
||||
|
||||
protected virtual void OnLayout()
|
||||
{
|
||||
}
|
||||
|
||||
bool BeginGUI()
|
||||
{
|
||||
// ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint Aborting
|
||||
|
|
@ -98,6 +102,7 @@ namespace UniGLTF
|
|||
// EventType.Layout と EventType.Repaint 間で内容が変わらないようしている。
|
||||
if (Event.current.type == EventType.Layout)
|
||||
{
|
||||
OnLayout();
|
||||
State.Validate(ValidatorFactory());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,13 +64,15 @@ namespace VRM
|
|||
{
|
||||
VRMExportSettings = settings;
|
||||
Clips = new List<BlendShapeClip>();
|
||||
var proxy = ExportRoot.GetComponent<VRMBlendShapeProxy>();
|
||||
if (proxy != null)
|
||||
if (ExportRoot != null)
|
||||
{
|
||||
// Export サイズ の 計算
|
||||
if (proxy.BlendShapeAvatar != null)
|
||||
var proxy = ExportRoot.GetComponent<VRMBlendShapeProxy>();
|
||||
if (proxy != null)
|
||||
{
|
||||
Clips.AddRange(proxy.BlendShapeAvatar.Clips);
|
||||
if (proxy.BlendShapeAvatar != null)
|
||||
{
|
||||
Clips.AddRange(proxy.BlendShapeAvatar.Clips);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,12 @@ namespace VRM
|
|||
VRMEditorExporter.Export(path, State.ExportRoot, Meta != null ? Meta : m_tmpMeta, m_settings, m_meshes.Meshes);
|
||||
}
|
||||
|
||||
protected override void OnLayout()
|
||||
{
|
||||
// m_settings, m_meshes.Meshes
|
||||
m_meshes.SetRoot(State.ExportRoot, m_settings);
|
||||
}
|
||||
|
||||
protected override bool DoGUI()
|
||||
{
|
||||
EditorGUILayout.HelpBox($"Mesh size: {m_meshes.ExpectedExportByteSize / 1000000.0f:0.0} MByte", MessageType.Info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user