mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-10 01:22:36 +02:00
Update AssetServer.cpp
This commit is contained in:
parent
0b387f5b38
commit
0260749b6b
1 changed files with 4 additions and 5 deletions
|
@ -99,7 +99,7 @@ std::pair<BakingStatus, QString> AssetServer::getAssetStatus(const AssetPath& pa
|
||||||
QString bakedFilename;
|
QString bakedFilename;
|
||||||
|
|
||||||
if (BAKEABLE_MODEL_EXTENSIONS.contains(extension)) {
|
if (BAKEABLE_MODEL_EXTENSIONS.contains(extension)) {
|
||||||
bakedFilename = BAKED_MODEL_SIMPLE_NAME;
|
bakedFilename = BAKED_MODEL_SIMPLE_NAME;
|
||||||
} else if (BAKEABLE_TEXTURE_EXTENSIONS.contains(extension.toLocal8Bit()) && hasMetaFile(hash)) {
|
} else if (BAKEABLE_TEXTURE_EXTENSIONS.contains(extension.toLocal8Bit()) && hasMetaFile(hash)) {
|
||||||
bakedFilename = BAKED_TEXTURE_SIMPLE_NAME;
|
bakedFilename = BAKED_TEXTURE_SIMPLE_NAME;
|
||||||
} else if (BAKEABLE_SCRIPT_EXTENSIONS.contains(extension)) {
|
} else if (BAKEABLE_SCRIPT_EXTENSIONS.contains(extension)) {
|
||||||
|
@ -1214,15 +1214,14 @@ void AssetServer::handleCompletedBake(QString originalAssetHash, QString origina
|
||||||
// setup the mapping for this bake file
|
// setup the mapping for this bake file
|
||||||
auto relativeFilePath = QUrl(filePath).fileName();
|
auto relativeFilePath = QUrl(filePath).fileName();
|
||||||
qDebug() << "Relative file path is: " << relativeFilePath;
|
qDebug() << "Relative file path is: " << relativeFilePath;
|
||||||
if (relativeFilePath.endsWith(".js", Qt::CaseInsensitive)) {
|
if (relativeFilePath.endsWith(".fbx", Qt::CaseInsensitive)) {
|
||||||
relativeFilePath = BAKED_ASSET_SIMPLE_JS_NAME;
|
|
||||||
} else if (relativeFilePath.endsWith(".fbx", Qt::CaseInsensitive)) {
|
|
||||||
// for an FBX file, we replace the filename with the simple name
|
// for an FBX file, we replace the filename with the simple name
|
||||||
// (to handle the case where two mapped assets have the same hash but different names)
|
// (to handle the case where two mapped assets have the same hash but different names)
|
||||||
relativeFilePath = BAKED_ASSET_SIMPLE_FBX_NAME;
|
relativeFilePath = BAKED_ASSET_SIMPLE_FBX_NAME;
|
||||||
|
} else if (relativeFilePath.endsWith(".js", Qt::CaseInsensitive)) {
|
||||||
|
relativeFilePath = BAKED_ASSET_SIMPLE_JS_NAME;
|
||||||
} else if (!originalAssetPath.endsWith(".fbx", Qt::CaseInsensitive)) {
|
} else if (!originalAssetPath.endsWith(".fbx", Qt::CaseInsensitive)) {
|
||||||
relativeFilePath = BAKED_ASSET_SIMPLE_TEXTURE_NAME;
|
relativeFilePath = BAKED_ASSET_SIMPLE_TEXTURE_NAME;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString bakeMapping = getBakeMapping(originalAssetHash, relativeFilePath);
|
QString bakeMapping = getBakeMapping(originalAssetHash, relativeFilePath);
|
||||||
|
|
Loading…
Reference in a new issue