diff --git a/src/fbxfile.cpp b/src/fbxfile.cpp index f3cb8db0..a3e558bc 100644 --- a/src/fbxfile.cpp +++ b/src/fbxfile.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "fbxfile.h" #include "version.h" #include "jointnodetree.h" @@ -2207,7 +2208,8 @@ FbxFileWriter::FbxFileWriter(Outcome &outcome, QImage *normalImage, QImage *ormImage, const std::vector>>> *motions) : - m_filename(filename) + m_filename(filename), + m_baseName(QFileInfo(m_filename).baseName()) { createFbxHeader(); createFileId(); @@ -3565,14 +3567,14 @@ FbxFileWriter::FbxFileWriter(Outcome &outcome, addTexture(textureImage, std::vector({'V','i','d','e','o',0,1,'B','a','s','e','C','o','l','o','r'}), std::vector({'T','e','x','t','u','r','e',0,1,'B','a','s','e','C','o','l','o','r'}), - "BaseColor.png", + m_baseName + "_color.png", "Maya|TEX_color_map"); } if (nullptr != normalImage) { addTexture(normalImage, std::vector({'V','i','d','e','o',0,1,'N','o','r','m','a','l'}), std::vector({'T','e','x','t','u','r','e',0,1,'N','o','r','m','a','l'}), - "Normal.png", + m_baseName + "_normal.png", "Maya|TEX_normal_map"); } /* diff --git a/src/fbxfile.h b/src/fbxfile.h index 7061ec43..2aef68ba 100644 --- a/src/fbxfile.h +++ b/src/fbxfile.h @@ -47,6 +47,7 @@ private: int64_t to64Id(const QUuid &uuid); int64_t m_next64Id = 612150000; QString m_filename; + QString m_baseName; fbx::FBXDocument m_fbxDocument; std::map m_uuidTo64Map; static std::vector m_identityMatrix;