mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
Merge pull request #2477 from ousttrue/fix/migration_no_binds_key
[migration] BlendShape の binds key が無いときに KeyNotFoundException
This commit is contained in:
@@ -239,8 +239,10 @@ namespace UniVRM10
|
||||
MaterialColorBinds = new List<UniGLTF.Extensions.VRMC_vrm.MaterialColorBind>(),
|
||||
TextureTransformBinds = new List<UniGLTF.Extensions.VRMC_vrm.TextureTransformBind>(),
|
||||
};
|
||||
expression.MorphTargetBinds = ToMorphTargetBinds(blendShapeClip["binds"], meshToNode).ToList();
|
||||
|
||||
if (blendShapeClip.TryGet("binds", out JsonNode binds))
|
||||
{
|
||||
expression.MorphTargetBinds = ToMorphTargetBinds(binds, meshToNode).ToList();
|
||||
}
|
||||
if (blendShapeClip.TryGet("materialValues", out JsonNode materialValues))
|
||||
{
|
||||
ToMaterialColorBinds(gltf, materialValues, expression);
|
||||
|
||||
Reference in New Issue
Block a user