From 3bbae2cf689dc10624410f903a31dd785507022e Mon Sep 17 00:00:00 2001 From: kovacsv Date: Wed, 16 Jun 2021 21:55:17 +0200 Subject: [PATCH] There is a problem with the mesh name #84 --- source/import/importergltf.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/import/importergltf.js b/source/import/importergltf.js index e2f6972..862f3b1 100644 --- a/source/import/importergltf.js +++ b/source/import/importergltf.js @@ -476,6 +476,7 @@ OV.ImporterGltf = class extends OV.ImporterBase ProcessMainFile (gltf) { + console.log (gltf); let unsupportedExtensions = this.gltfExtensions.GetUnsupportedExtensions (gltf.extensionsRequired); if (unsupportedExtensions.length > 0) { this.SetError (); @@ -726,6 +727,8 @@ OV.ImporterGltf = class extends OV.ImporterBase this.model.AddMesh (mesh); if (gltfMesh.name !== undefined) { mesh.SetName (gltfMesh.name); + } else if (gltfNode.name !== undefined) { + mesh.SetName (gltfNode.name); } for (let i = 0; i < gltfMesh.primitives.length; i++) {