mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-10 04:49:28 -05:00
Warning message for jaw bone
This commit is contained in:
@@ -60,10 +60,17 @@ namespace VRM
|
||||
var helpBuilder = new StringBuilder();
|
||||
var errorBuilder = new StringBuilder();
|
||||
|
||||
foreach(var msg in m_settings.CanExport())
|
||||
foreach (var validation in m_settings.CanExport())
|
||||
{
|
||||
isValid = false;
|
||||
errorBuilder.Append(msg);
|
||||
if (!validation.CanExport)
|
||||
{
|
||||
isValid = false;
|
||||
errorBuilder.Append(validation.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
helpBuilder.Append(validation.Message);
|
||||
}
|
||||
}
|
||||
|
||||
helpString = helpBuilder.ToString();
|
||||
|
||||
@@ -50,6 +50,11 @@ namespace VRM
|
||||
{
|
||||
return new Validation(false, msg);
|
||||
}
|
||||
|
||||
public static Validation Warning(string msg)
|
||||
{
|
||||
return new Validation(true, msg);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Validation> CanExport()
|
||||
@@ -78,6 +83,12 @@ namespace VRM
|
||||
yield return Validation.Error("Animator.avatar is not humanoid. Please change model's AnimationType to humanoid. ");
|
||||
}
|
||||
|
||||
var jaw = animator.GetBoneTransform(HumanBodyBones.Jaw);
|
||||
if (jaw != null)
|
||||
{
|
||||
yield return Validation.Warning("Jaw bone is included. It may not be what you intended. Please check the humanoid avatar setting screen");
|
||||
}
|
||||
|
||||
if (DuplicateBoneNameExists())
|
||||
{
|
||||
yield return Validation.Error("Find duplicate Bone names. Please check model's bone names. ");
|
||||
|
||||
Reference in New Issue
Block a user