mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-23 02:55:07 -05:00
エラーを警告に落とした。エクスポート時に null check を追加した。
This commit is contained in:
@@ -26,7 +26,7 @@ namespace VRM
|
||||
var key = c.Key;
|
||||
if (used.Contains(key))
|
||||
{
|
||||
yield return Validation.Error($"duplicated BlendShapeKey: {c}");
|
||||
yield return Validation.Error($"duplicated BlendShapeKey: {key}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -55,7 +55,7 @@ namespace VRM
|
||||
var target = p.transform.Find(v.RelativePath);
|
||||
if (target == null)
|
||||
{
|
||||
yield return Validation.Error($"{c}.Values[{i}].RelativePath({v.RelativePath} is not found");
|
||||
yield return Validation.Warning($"{c}.Values[{i}].RelativePath({v.RelativePath} is not found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace VRM
|
||||
var v = c.MaterialValues[i];
|
||||
if (!materialNames.Contains(v.MaterialName))
|
||||
{
|
||||
yield return Validation.Error($"{c}.MaterialValues[{i}].MaterialName({v.MaterialName} is not found");
|
||||
yield return Validation.Warning($"{c}.MaterialValues[{i}].MaterialName({v.MaterialName} is not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,12 @@ namespace VRM
|
||||
public static glTF_VRM_BlendShapeBind Create(Transform root, BlendShapeBinding binding,
|
||||
gltfExporter exporter)
|
||||
{
|
||||
var transform = UniGLTF.UnityExtensions.GetFromPath(root.transform, binding.RelativePath);
|
||||
var transform = root.transform.Find(binding.RelativePath);
|
||||
if (transform == null)
|
||||
{
|
||||
Debug.LogWarning($"{binding.RelativePath} not found");
|
||||
return null;
|
||||
}
|
||||
var renderer = transform.GetComponent<SkinnedMeshRenderer>();
|
||||
if (renderer == null)
|
||||
{
|
||||
@@ -38,7 +43,7 @@ namespace VRM
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!exporter.MeshBlendShapeIndexMap.TryGetValue(mesh, out Dictionary<int, int> blendShapeIndexMap))
|
||||
if (!exporter.MeshBlendShapeIndexMap.TryGetValue(mesh, out Dictionary<int, int> blendShapeIndexMap))
|
||||
{
|
||||
// この Mesh は エクスポートされていない
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user