fix model check for filenames with periods

This commit is contained in:
Stephen Birarda 2017-05-23 14:22:16 -07:00
parent 898433f42e
commit 9cdd7cc895
2 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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;