|
@@ -1209,6 +1209,7 @@ export class _GLTFMaterialExporter {
|
|
|
|
|
|
let extension = mimeType === ImageMimeType.JPEG ? '.jpeg' : '.png';
|
|
|
let textureName = baseTextureName + extension;
|
|
|
+ let originalTextureName = textureName;
|
|
|
if (textureName in imageData) {
|
|
|
textureName = `${baseTextureName}_${Tools.RandomId()}${extension}`;
|
|
|
}
|
|
@@ -1220,8 +1221,9 @@ export class _GLTFMaterialExporter {
|
|
|
uri: textureName
|
|
|
};
|
|
|
let foundIndex: Nullable<number> = null;
|
|
|
+
|
|
|
for (let i = 0; i < images.length; ++i) {
|
|
|
- if (images[i].uri === textureName) {
|
|
|
+ if (images[i].uri === originalTextureName) {
|
|
|
foundIndex = i;
|
|
|
break;
|
|
|
}
|