mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 19:50:38 +02:00
fix model check for filenames with periods
This commit is contained in:
parent
898433f42e
commit
9cdd7cc895
2 changed files with 7 additions and 7 deletions
|
@ -494,7 +494,7 @@ gpu::TexturePointer TextureUsage::process2DTextureColorFromImage(const QImage& s
|
||||||
if (validAlpha) {
|
if (validAlpha) {
|
||||||
processTextureAlpha(image, validAlpha, alphaAsMask);
|
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).
|
// for the tutorial. Instead we use BC3 (which is larger) but doesn't produce the same artifacts).
|
||||||
alphaAsMask = false;
|
alphaAsMask = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,15 +167,15 @@ void DomainBaker::enumerateEntities() {
|
||||||
// check if the file pointed to by this URL is a bakeable model, by comparing extensions
|
// check if the file pointed to by this URL is a bakeable model, by comparing extensions
|
||||||
auto modelFileName = modelURL.fileName();
|
auto modelFileName = modelURL.fileName();
|
||||||
|
|
||||||
static const QStringList BAKEABLE_MODEL_EXTENSIONS { ".fbx" };
|
static const QString BAKEABLE_MODEL_EXTENSION { ".fbx" };
|
||||||
auto completeLowerExtension = modelFileName.mid(modelFileName.indexOf('.')).toLower();
|
|
||||||
|
|
||||||
static const QString BAKED_MODEL_EXTENSION = ".baked.fbx";
|
static const QString BAKED_MODEL_EXTENSION = ".baked.fbx";
|
||||||
|
|
||||||
if (BAKEABLE_MODEL_EXTENSIONS.contains(completeLowerExtension) ||
|
bool isBakedFBX = modelFileName.endsWith(BAKED_MODEL_EXTENSION, Qt::CaseInsensitive);
|
||||||
(_shouldRebakeOriginals && completeLowerExtension == BAKED_MODEL_EXTENSION)) {
|
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
|
// grab a URL to the original, that we assume is stored a directory up, in the "original" folder
|
||||||
// with just the fbx extension
|
// with just the fbx extension
|
||||||
qDebug() << "Re-baking original for" << modelURL;
|
qDebug() << "Re-baking original for" << modelURL;
|
||||||
|
|
Loading…
Reference in a new issue