Merge pull request #816 from ousttrue/fix/nameless_targets

blendShapeが名無しの場合に連番を付ける
This commit is contained in:
PoChang007
2021-03-22 22:04:21 -09:00
committed by GitHub

View File

@@ -58,6 +58,21 @@ namespace UniGLTF
}
}
if (mesh.primitives.Count > 0)
{
var prim = mesh.primitives[0];
if (prim.targets.Count > 0)
{
// 名無しには連番を付ける
targetNames = new List<string>();
for (int i = 0; i < prim.targets.Count; ++i)
{
targetNames.Add($"{i}");
}
return true;
}
}
targetNames = default;
return false;
}