From 730efacdc6913f55bb8812f743cf122dc10512b6 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 17 Nov 2020 15:57:44 +0900 Subject: [PATCH 1/3] fix Error message --- Assets/VRM/DepthFirstScheduler/Schedulable.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/VRM/DepthFirstScheduler/Schedulable.cs b/Assets/VRM/DepthFirstScheduler/Schedulable.cs index 3605c1b44..587355a88 100644 --- a/Assets/VRM/DepthFirstScheduler/Schedulable.cs +++ b/Assets/VRM/DepthFirstScheduler/Schedulable.cs @@ -116,7 +116,8 @@ namespace DepthFirstScheduler { if (status == ExecutionStatus.Error) { - throw x.GetError(); + // throw x.GetError(); + UnityEngine.Debug.LogException(x.GetError()); } break; } From 4ef5b659f5aa2966557c75865a095c1a2da6f2de Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 17 Nov 2020 16:00:36 +0900 Subject: [PATCH 2/3] fix warning --- Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs index 09104286b..d33906744 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -449,7 +449,9 @@ namespace UniGLTF Truncate(m_uv2, maxIndex); Truncate(m_colors, maxIndex); Truncate(m_boneWeights, maxIndex); +#if false Truncate(m_tangents, maxIndex); +#endif foreach (var blendshape in m_blendShapes) { Truncate(blendshape.Positions, maxIndex); From 04c064aa6e12af108fe2e5e908993c04bbc280fb Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 17 Nov 2020 16:08:32 +0900 Subject: [PATCH 3/3] fix prim.targets.count == prim.extras.targetNames.count check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 古いデータで先頭の prim[0] にしか morph のデータを格納してないタイプ #616 --- Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs index d33906744..b1b1d62c4 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/MeshImporter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -405,16 +405,13 @@ namespace UniGLTF if (prim.extras != null && prim.extras.targetNames != null) { var targetNames = prim.extras.targetNames; - for (int i = 1; i < gltfMesh.primitives.Count; ++i) + for (var i = 0; i < BlendShapes.Count; i++) { - if (gltfMesh.primitives[i].targets.Count != targetNames.Count) + if (i >= targetNames.Count) { - throw new FormatException(string.Format("different targets length: {0} with targetNames length.", - gltfMesh.primitives[i])); + Debug.LogWarning($"invalid primitive.extras.targetNames length"); + break; } - } - for (var i = 0; i < targetNames.Count; i++) - { BlendShapes[i].Name = targetNames[i]; } }