mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
Indentation Fixes
This commit is contained in:
parent
5d5e62d002
commit
98ec464106
4 changed files with 16 additions and 12 deletions
|
@ -358,16 +358,19 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
|||
|
||||
if (textureChild.name == "RelativeFilename") {
|
||||
QString fbxTextureFileName { textureChild.properties.at(0).toByteArray() };
|
||||
QByteArray textureContent = "";
|
||||
QFileInfo fbxTextureFileInfo { fbxTextureFileName.replace("\\", "/") };
|
||||
// Callback to get texture content and type from FBXBaker in ModelBaker
|
||||
|
||||
QByteArray textureContent = "";
|
||||
if (!fbxTextureFileInfo.filePath().isEmpty()) {
|
||||
textureContent = _textureContent.value(fbxTextureFileName.toLocal8Bit());
|
||||
}
|
||||
|
||||
// Callback to get texture content and type
|
||||
getTextureContentTypeCallback textureContentTypeCallback = [=]() {
|
||||
QPair<QByteArray, image::TextureUsage::Type> result;
|
||||
result.first = textureContent;// _textureContent.value(fbxTextureFileName.toLocal8Bit());
|
||||
result.first = textureContent;
|
||||
// grab the ID for this texture so we can figure out the
|
||||
// texture type from the loaded materials
|
||||
auto textureID{ object->properties[0].toByteArray() };
|
||||
auto textureType = textureTypes[textureID];
|
||||
result.second = textureType;
|
||||
|
@ -375,7 +378,8 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
|||
};
|
||||
|
||||
// Compress the texture information and return the new filename to be added into the FBX scene
|
||||
QByteArray* bakedTextureFile = this->compressTexture(fbxTextureFileName, _fbxURL, _bakedOutputDir, _textureThreadGetter, textureContentTypeCallback, _originalOutputDir);
|
||||
QByteArray* bakedTextureFile = this->compressTexture(fbxTextureFileName, _fbxURL, _bakedOutputDir, _textureThreadGetter,
|
||||
textureContentTypeCallback, _originalOutputDir);
|
||||
|
||||
// If no errors or warnings have occurred during texture compression add the filename to the FBX scene
|
||||
if (bakedTextureFile) {
|
||||
|
|
Loading…
Reference in a new issue