mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 22:09:53 -05:00
Merge pull request #2214 from tsgcpp/feature/ignore_invalid_mesh_indices
VRM0.xでMeshAnnotationsのmeshに-1が指定されていると一人称メッシュ作成時にNotImplementedExceptionが発生する問題を回避する
This commit is contained in:
commit
2c55dc9db0
|
|
@ -70,6 +70,10 @@ namespace UniVRM10
|
|||
if (meshAnnotationJsonNode.TryGet(key, out var meshIndexJsonNode))
|
||||
{
|
||||
var meshIndex = meshIndexJsonNode.GetInt32();
|
||||
if (meshIndex < 0)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
|
||||
// NOTE: VRM 1.0 では glTF の Node Index を記録するため、それに変換する.
|
||||
// TODO: mesh が共有されたノードの場合はどうなる? 0x の場合はどうなっていたかを調べて挙動を追従する.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user