Update texture output format in AssxmlFileWriter (#6372)

* Update texture output format in AssxmlFileWriter
This commit is contained in:
Kim Kulling
2025-10-17 11:24:38 +02:00
committed by GitHub
parent f544f9c217
commit cc6ab1408f

View File

@@ -301,7 +301,11 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene,
bool compressed = (tex->mHeight == 0);
// mesh header
ioprintf(io, "\t<Texture width=\"%u\" height=\"%u\" compressed=\"%s\"> \n",
std::string texName = "unknown";
if (tex->mFilename.length != 0u) {
texName = tex->mFilename.data;
}
ioprintf(io, "\t<Texture name=\"%s\" width=\"%u\" height=\"%u\" compressed=\"%s\"> \n", texName.c_str(),
(compressed ? -1 : tex->mWidth), (compressed ? -1 : tex->mHeight),
(compressed ? "true" : "false"));