mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-06-02 00:47:02 -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>();
|
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();
|
var materials = renderers.SelectMany(x => x.sharedMaterials).Distinct();
|
||||||
foreach (var material in materials)
|
foreach (var material in materials)
|
||||||
{
|
{
|
||||||
|
|
@ -373,8 +368,10 @@ namespace VRM
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorGUILayout.LabelField("ExportRoot");
|
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 を表示しない
|
// ここでも validate している。ここで失敗して return した場合は Export UI を表示しない
|
||||||
|
|
@ -383,21 +380,29 @@ namespace VRM
|
||||||
//
|
//
|
||||||
// root
|
// root
|
||||||
//
|
//
|
||||||
if (root == null)
|
if (ExportRoot == null)
|
||||||
{
|
{
|
||||||
Validation.Error(Msg.ROOT_EXISTS).DrawGUI();
|
Validation.Error(Msg.ROOT_EXISTS).DrawGUI();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (root.transform.parent != null)
|
if (ExportRoot.transform.parent != null)
|
||||||
{
|
{
|
||||||
Validation.Error(Msg.NO_PARENT).DrawGUI();
|
Validation.Error(Msg.NO_PARENT).DrawGUI();
|
||||||
return;
|
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();
|
Validation.Error(Msg.ROOT_WITHOUT_ROTATION_AND_SCALING_CHANGED).DrawGUI();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var renderers = ExportRoot.GetComponentsInChildren<Renderer>();
|
||||||
|
if (renderers.All(x => !EnableRenderer(x)))
|
||||||
|
{
|
||||||
|
Validation.Error(Msg.NO_ACTIVE_MESH).DrawGUI();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (HasRotationOrScale(ExportRoot))
|
if (HasRotationOrScale(ExportRoot))
|
||||||
{
|
{
|
||||||
if (m_settings.PoseFreeze)
|
if (m_settings.PoseFreeze)
|
||||||
|
|
@ -424,7 +429,7 @@ namespace VRM
|
||||||
//
|
//
|
||||||
// animator
|
// animator
|
||||||
//
|
//
|
||||||
var animator = root.GetComponent<Animator>();
|
var animator = ExportRoot.GetComponent<Animator>();
|
||||||
if (animator == null)
|
if (animator == null)
|
||||||
{
|
{
|
||||||
Validation.Error(Msg.NO_ANIMATOR).DrawGUI();
|
Validation.Error(Msg.NO_ANIMATOR).DrawGUI();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user