From f6dc69d2506be8d2084b362c23f3308a8da15390 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 7 Jun 2021 19:35:55 +0900 Subject: [PATCH 1/2] reduce message --- Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs index 563b9d2e4..449b9e882 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs @@ -44,7 +44,9 @@ namespace UniGLTF var positionAccessorIndex = -1; if (sparseIndices.Length > 0) { +#if VRM_DEVELOP Debug.LogFormat("Sparse {0}/{1}", sparseIndices.Length, positions.Length); +#endif var sparseIndicesViewIndex = gltf.ExtendBufferAndGetViewIndex(gltfBuffer, sparseIndices); positionAccessorIndex = gltf.ExtendSparseBufferAndGetAccessorIndex(gltfBuffer, accessorCount, positions, sparseIndices, sparseIndicesViewIndex, glBufferTarget.NONE); } From cb807bafa9c4bd37a18e9ed35f9610f756d35c23 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 7 Jun 2021 19:43:18 +0900 Subject: [PATCH 2/2] fix MeshExportUtil.BlendShapeBuffe size. mesh.index count to submesh.index count. --- .../UniGLTF/IO/MeshIO/MeshExporter_DividedVertexBuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_DividedVertexBuffer.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_DividedVertexBuffer.cs index bd7796073..3c7988919 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_DividedVertexBuffer.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_DividedVertexBuffer.cs @@ -89,7 +89,7 @@ namespace UniGLTF // blendShape(morph target) for (int j = 0; j < mesh.blendShapeCount; ++j) { - var blendShape = new MeshExportUtil.BlendShapeBuffer(indices.Length); + var blendShape = new MeshExportUtil.BlendShapeBuffer(usedIndices.Count); // aggriage morph target mesh.GetBlendShapeFrameVertices(j, 0, blendShapePositions, blendShapeNormals, null);