mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-26 21:04:14 -05:00
Merge pull request #816 from ousttrue/fix/nameless_targets
blendShapeが名無しの場合に連番を付ける
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user