From b90425e247e7d4aea8605bb864e67e402b3e5e74 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Wed, 3 Nov 2021 08:19:44 +0100 Subject: [PATCH] Set texture name based on three map name. --- source/import/importerthree.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/import/importerthree.js b/source/import/importerthree.js index bbdf57b..392b9ba 100644 --- a/source/import/importerthree.js +++ b/source/import/importerthree.js @@ -238,6 +238,8 @@ OV.ImporterThreeBase = class extends OV.ImporterBase let textureName = null; if (objectUrlToFileName.has (threeMap.image.src)) { textureName = objectUrlToFileName.get (threeMap.image.src); + } else if (threeMap.name !== undefined && threeMap.name !== null) { + textureName = threeMap.name + '.' + OV.GetFileExtensionFromMimeType (base64Buffer.mimeType); } else { textureName = 'Embedded_' + threeMap.id.toString () + '.' + OV.GetFileExtensionFromMimeType (base64Buffer.mimeType); }