mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-13 14:29:38 -05:00
@@ -144,33 +144,32 @@ namespace UniGLTF
|
||||
//
|
||||
// Create and Other Buttons
|
||||
{
|
||||
// errors
|
||||
GUILayout.BeginVertical();
|
||||
// GUILayout.FlexibleSpace();
|
||||
|
||||
// errors
|
||||
using (new GUILayout.VerticalScope())
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
GUI.enabled = State.Validations.All(x => x.CanExport);
|
||||
|
||||
if (GUILayout.Button("Export", GUILayout.MinWidth(100)))
|
||||
// GUILayout.FlexibleSpace();
|
||||
{
|
||||
var path = SaveFileDialog.GetPath(SaveTitle, SaveName, SaveExtensions);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
using (new GUILayout.HorizontalScope())
|
||||
{
|
||||
ExportPath(path);
|
||||
// close
|
||||
Close();
|
||||
GUIUtility.ExitGUI();
|
||||
GUILayout.FlexibleSpace();
|
||||
GUI.enabled = State.Validations.All(x => x.CanExport);
|
||||
|
||||
if (GUILayout.Button("Export", GUILayout.MinWidth(100)))
|
||||
{
|
||||
var path = SaveFileDialog.GetPath(SaveTitle, SaveName, SaveExtensions);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
ExportPath(path);
|
||||
// close
|
||||
Close();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
}
|
||||
GUI.enabled = true;
|
||||
}
|
||||
}
|
||||
GUI.enabled = true;
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
GUILayout.Space(8);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ namespace UniVRM10
|
||||
{
|
||||
public static void Open()
|
||||
{
|
||||
var window = (VRM10ExportDialog)GetWindow(typeof(VRM10ExportDialog));
|
||||
window.titleContent = new GUIContent("VRM-1.0 Exporter");
|
||||
var window = GetWindow<VRM10ExportDialog>("VRM-1.0 Exporter");
|
||||
window.Show();
|
||||
}
|
||||
|
||||
@@ -203,7 +202,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Separator();
|
||||
GUI.enabled = backup;
|
||||
}
|
||||
|
||||
@@ -302,7 +301,8 @@ namespace UniVRM10
|
||||
{
|
||||
m_logLabel += ex.ToString();
|
||||
// rethrow
|
||||
throw;
|
||||
//throw;
|
||||
Debug.LogException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace UniVRM10
|
||||
case ExpressionPreset.lookLeft: asset.Expression.LookLeft = kv.Value; break;
|
||||
case ExpressionPreset.lookRight: asset.Expression.LookRight = kv.Value; break;
|
||||
case ExpressionPreset.neutral: asset.Expression.Neutral = kv.Value; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,6 +156,11 @@ namespace UniVRM10
|
||||
|
||||
public bool TryGetBoneTransform(HumanBodyBones bone, out Transform t)
|
||||
{
|
||||
if (Humanoid == null)
|
||||
{
|
||||
t = null;
|
||||
return false;
|
||||
}
|
||||
t = Humanoid.GetBoneTransform(bone);
|
||||
if (t == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user