mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 22:50:08 -05:00
NO_ACTIVE_MESH の位置を変更
This commit is contained in:
parent
483ebf0e8c
commit
5a2ed85b3d
|
|
@ -181,11 +181,6 @@ namespace VRM
|
|||
}
|
||||
|
||||
var renderers = ExportRoot.GetComponentsInChildren<Renderer>();
|
||||
if (renderers.All(x => !EnableRenderer(x)))
|
||||
{
|
||||
yield return Validation.Error(Msg.NO_ACTIVE_MESH);
|
||||
}
|
||||
|
||||
var materials = renderers.SelectMany(x => x.sharedMaterials).Distinct();
|
||||
foreach (var material in materials)
|
||||
{
|
||||
|
|
@ -373,8 +368,10 @@ namespace VRM
|
|||
}
|
||||
|
||||
EditorGUILayout.LabelField("ExportRoot");
|
||||
var root = (GameObject)EditorGUILayout.ObjectField(ExportRoot, typeof(GameObject), true);
|
||||
UpdateRoot(root);
|
||||
{
|
||||
var root = (GameObject)EditorGUILayout.ObjectField(ExportRoot, typeof(GameObject), true);
|
||||
UpdateRoot(root);
|
||||
}
|
||||
|
||||
//
|
||||
// ここでも validate している。ここで失敗して return した場合は Export UI を表示しない
|
||||
|
|
@ -383,21 +380,29 @@ namespace VRM
|
|||
//
|
||||
// root
|
||||
//
|
||||
if (root == null)
|
||||
if (ExportRoot == null)
|
||||
{
|
||||
Validation.Error(Msg.ROOT_EXISTS).DrawGUI();
|
||||
return;
|
||||
}
|
||||
if (root.transform.parent != null)
|
||||
if (ExportRoot.transform.parent != null)
|
||||
{
|
||||
Validation.Error(Msg.NO_PARENT).DrawGUI();
|
||||
return;
|
||||
}
|
||||
if (root.transform.localRotation != Quaternion.identity || root.transform.localScale != Vector3.one)
|
||||
if (ExportRoot.transform.localRotation != Quaternion.identity || ExportRoot.transform.localScale != Vector3.one)
|
||||
{
|
||||
Validation.Error(Msg.ROOT_WITHOUT_ROTATION_AND_SCALING_CHANGED).DrawGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
var renderers = ExportRoot.GetComponentsInChildren<Renderer>();
|
||||
if (renderers.All(x => !EnableRenderer(x)))
|
||||
{
|
||||
Validation.Error(Msg.NO_ACTIVE_MESH).DrawGUI();
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasRotationOrScale(ExportRoot))
|
||||
{
|
||||
if (m_settings.PoseFreeze)
|
||||
|
|
@ -424,7 +429,7 @@ namespace VRM
|
|||
//
|
||||
// animator
|
||||
//
|
||||
var animator = root.GetComponent<Animator>();
|
||||
var animator = ExportRoot.GetComponent<Animator>();
|
||||
if (animator == null)
|
||||
{
|
||||
Validation.Error(Msg.NO_ANIMATOR).DrawGUI();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user