mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 11:24:10 +02:00
Merge pull request #11592 from birarda/bug/ignore-dds-in-fbx
ignore unbakeable textures in FBXBaker
This commit is contained in:
commit
23563cca47
1 changed files with 9 additions and 0 deletions
|
@ -594,6 +594,10 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
||||||
QString fbxTextureFileName { textureChild.properties.at(0).toByteArray() };
|
QString fbxTextureFileName { textureChild.properties.at(0).toByteArray() };
|
||||||
QFileInfo textureFileInfo { fbxTextureFileName.replace("\\", "/") };
|
QFileInfo textureFileInfo { fbxTextureFileName.replace("\\", "/") };
|
||||||
|
|
||||||
|
if (hasErrors()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (textureFileInfo.suffix() == BAKED_TEXTURE_EXT.mid(1)) {
|
if (textureFileInfo.suffix() == BAKED_TEXTURE_EXT.mid(1)) {
|
||||||
// re-baking an FBX that already references baked textures is a fail
|
// re-baking an FBX that already references baked textures is a fail
|
||||||
// so we add an error and return from here
|
// so we add an error and return from here
|
||||||
|
@ -602,6 +606,11 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!TextureBaker::getSupportedFormats().contains(textureFileInfo.suffix())) {
|
||||||
|
// this is a texture format we don't bake, skip it
|
||||||
|
handleWarning(fbxTextureFileName + " is not a bakeable texture format");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure this texture points to something and isn't one we've already re-mapped
|
// make sure this texture points to something and isn't one we've already re-mapped
|
||||||
if (!textureFileInfo.filePath().isEmpty()) {
|
if (!textureFileInfo.filePath().isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue