diff --git a/libraries/image/src/image/Image.cpp b/libraries/image/src/image/Image.cpp index 2a72304f5c..dcc65e8995 100644 --- a/libraries/image/src/image/Image.cpp +++ b/libraries/image/src/image/Image.cpp @@ -494,7 +494,7 @@ gpu::TexturePointer TextureUsage::process2DTextureColorFromImage(const QImage& s if (validAlpha) { processTextureAlpha(image, validAlpha, alphaAsMask); - // NOTE: This disables BC1a compression becuase it was producing odd artifacts on text textures + // NOTE: This disables BC1a compression because it was producing odd artifacts on text textures // for the tutorial. Instead we use BC3 (which is larger) but doesn't produce the same artifacts). alphaAsMask = false; } diff --git a/tools/oven/src/DomainBaker.cpp b/tools/oven/src/DomainBaker.cpp index fe0808de73..03bc350f42 100644 --- a/tools/oven/src/DomainBaker.cpp +++ b/tools/oven/src/DomainBaker.cpp @@ -167,15 +167,15 @@ void DomainBaker::enumerateEntities() { // check if the file pointed to by this URL is a bakeable model, by comparing extensions auto modelFileName = modelURL.fileName(); - static const QStringList BAKEABLE_MODEL_EXTENSIONS { ".fbx" }; - auto completeLowerExtension = modelFileName.mid(modelFileName.indexOf('.')).toLower(); - + static const QString BAKEABLE_MODEL_EXTENSION { ".fbx" }; static const QString BAKED_MODEL_EXTENSION = ".baked.fbx"; - if (BAKEABLE_MODEL_EXTENSIONS.contains(completeLowerExtension) || - (_shouldRebakeOriginals && completeLowerExtension == BAKED_MODEL_EXTENSION)) { + bool isBakedFBX = modelFileName.endsWith(BAKED_MODEL_EXTENSION, Qt::CaseInsensitive); + bool isUnbakedFBX = modelFileName.endsWith(BAKEABLE_MODEL_EXTENSION, Qt::CaseInsensitive) && !isBakedFBX; - if (completeLowerExtension == BAKED_MODEL_EXTENSION) { + if (isUnbakedFBX || (_shouldRebakeOriginals && isBakedFBX)) { + + if (isBakedFBX) { // grab a URL to the original, that we assume is stored a directory up, in the "original" folder // with just the fbx extension qDebug() << "Re-baking original for" << modelURL;