diff --git a/src/fbx/Fbx2Raw.cpp b/src/fbx/Fbx2Raw.cpp index d4d5151..03be3a0 100644 --- a/src/fbx/Fbx2Raw.cpp +++ b/src/fbx/Fbx2Raw.cpp @@ -469,7 +469,7 @@ static void ReadMesh( const RawMaterialType materialType = GetMaterialType(raw, textures, vertexTransparency, skinning.IsSkinned()); const int rawMaterialIndex = raw.AddMaterial( - materialId, materialName, materialType, textures, rawMatProps, userProperties, false ); + materialId, materialName, materialType, textures, rawMatProps, userProperties, false); raw.AddTriangle( rawVertexIndices[0], diff --git a/src/gltf/Raw2Gltf.cpp b/src/gltf/Raw2Gltf.cpp index e3273c4..b6d3a32 100644 --- a/src/gltf/Raw2Gltf.cpp +++ b/src/gltf/Raw2Gltf.cpp @@ -393,12 +393,12 @@ ModelData* Raw2Gltf( }, false); - if (aoMetRoughTex != nullptr) { - // if we successfully built a texture, factors are just multiplicative identity - metallic = roughness = 1.0f; - } else { - // no shininess texture, - roughness = getRoughness(props->shininess); + if (aoMetRoughTex != nullptr) { + // if we successfully built a texture, factors are just multiplicative identity + metallic = roughness = 1.0f; + } else { + // no shininess texture, + roughness = getRoughness(props->shininess); } } else { diff --git a/src/gltf/properties/MaterialData.cpp b/src/gltf/properties/MaterialData.cpp index e67c215..75892b0 100644 --- a/src/gltf/properties/MaterialData.cpp +++ b/src/gltf/properties/MaterialData.cpp @@ -94,13 +94,14 @@ MaterialData::MaterialData( pbrMetallicRoughness(pbrMetallicRoughness) {} json MaterialData::serialize() const { - json result = {{"name", name}, - {"alphaMode", isTransparent ? "BLEND" : "OPAQUE"}, - {"doubleSided", isDoubleSided}, - {"extras", - {{"fromFBX", - {{"shadingModel", Describe(shadingModel)}, - {"isTruePBR", shadingModel == RAW_SHADING_MODEL_PBR_MET_ROUGH}}}}}}; + json result = { + {"name", name}, + {"alphaMode", isTransparent ? "BLEND" : "OPAQUE"}, + {"doubleSided", isDoubleSided}, + {"extras", + {{"fromFBX", + {{"shadingModel", Describe(shadingModel)}, + {"isTruePBR", shadingModel == RAW_SHADING_MODEL_PBR_MET_ROUGH}}}}}}; if (normalTexture != nullptr) { result["normalTexture"] = *normalTexture; diff --git a/src/raw/RawModel.cpp b/src/raw/RawModel.cpp index 1cf97b5..fa30079 100644 --- a/src/raw/RawModel.cpp +++ b/src/raw/RawModel.cpp @@ -150,7 +150,7 @@ int RawModel::AddMaterial( const int textures[RAW_TEXTURE_USAGE_MAX], std::shared_ptr materialInfo, const std::vector& userProperties, - const bool isDoubleSided ) { + const bool isDoubleSided) { for (size_t i = 0; i < materials.size(); i++) { if (materials[i].name != name) { continue; diff --git a/src/raw/RawModel.hpp b/src/raw/RawModel.hpp index afbd3d1..066e555 100644 --- a/src/raw/RawModel.hpp +++ b/src/raw/RawModel.hpp @@ -383,7 +383,7 @@ class RawModel { const int textures[RAW_TEXTURE_USAGE_MAX], std::shared_ptr materialInfo, const std::vector& userProperties, - const bool isDoubleSided ); + const bool isDoubleSided); int AddLight( const char* name, RawLightType lightType,