Indentation Fixes

This commit is contained in:
utkarshgautamnyu 2017-10-24 16:05:00 -07:00
parent 5d5e62d002
commit 98ec464106
4 changed files with 16 additions and 12 deletions

View file

@ -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) {