From e3ed40ffcd103836f73ab6565ed27b61fcc4cb0c Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 28 Jul 2020 15:44:52 +0900 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E3=81=AE=E3=83=9E=E3=83=86=E3=83=AA?= =?UTF-8?q?=E3=82=A2=E3=83=AB=E3=81=AEindex=E3=81=9A=E3=82=8C=E5=AF=BE?= =?UTF-8?q?=E7=AD=96=E3=81=8C=E3=80=81=E3=83=86=E3=82=B9=E3=83=88=20`SameM?= =?UTF-8?q?eshButDifferentMaterialExport`=20=E3=81=AB=E3=81=95=E3=81=95?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=80=82=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs index c60cc83a6..e0605a9d0 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs @@ -280,7 +280,11 @@ namespace UniGLTF ExportOnlyBlendShapePosition, removeVertexColor)) { gltf.meshes.Add(gltfMesh); - MeshBlendShapeIndexMap.Add(mesh, blendShapeIndexMap); + if (!MeshBlendShapeIndexMap.ContainsKey(mesh)) + { + // 同じmeshが複数回現れた + MeshBlendShapeIndexMap.Add(mesh, blendShapeIndexMap); + } } Meshes = unityMeshes.Select(x => x.Mesh).ToList(); #endregion