From c9a1eb6fe219a93472f6182f4235a1b6e79cdee0 Mon Sep 17 00:00:00 2001 From: danielbui78 Date: Sat, 21 Oct 2023 14:41:39 -0400 Subject: [PATCH] Work-around for MakeUniqueFilenames failing (needs hash function) --- src/DzBridgeAction.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/DzBridgeAction.cpp b/src/DzBridgeAction.cpp index 79d4589..560d148 100644 --- a/src/DzBridgeAction.cpp +++ b/src/DzBridgeAction.cpp @@ -2375,6 +2375,17 @@ QString DzBridgeAction::exportAssetWithDtu(QString sFilename, QString sAssetMate QString exportPath = this->m_sRootFolder.replace("\\","/") + "/" + this->m_sExportSubfolder.replace("\\", "/"); QString fileStem = QFileInfo(sFilename).fileName(); + // DB 2023-Oct-20: FIX for non-unique filenames + if (isTemporaryFile(sFilename) == false) + { + QStringList filePathArray = cleanedFilename.replace(" ", "").split("/"); + int len = filePathArray.count(); + for (int i = 2; i < 5; i++) + { + if (i > len) break; + fileStem = filePathArray[len - i] + "_" + fileStem; + } + } exportPath += "/ExportTextures/"; QDir().mkpath(exportPath);