fixed indentation

pull/4787/head
Adam Beili 2022-11-04 09:37:28 -07:00
parent 852ea8325c
commit 945d93b46a
6 changed files with 13 additions and 13 deletions

View File

@ -840,8 +840,8 @@ struct Material : public Object {
//extension: KHR_materials_ior
Nullable<MaterialIOR> materialIOR;
//extension: KHR_materials_emissive_strength
//extension: KHR_materials_emissive_strength
Nullable<MaterialEmissiveStrength> materialEmissiveStrength;
//extension: KHR_materials_unlit
@ -1117,7 +1117,7 @@ public:
bool KHR_materials_transmission;
bool KHR_materials_volume;
bool KHR_materials_ior;
bool KHR_materials_emissive_strength;
bool KHR_materials_emissive_strength;
bool KHR_draco_mesh_compression;
bool FB_ngon_encoding;
bool KHR_texture_basisu;
@ -1132,7 +1132,7 @@ public:
KHR_materials_transmission(false),
KHR_materials_volume(false),
KHR_materials_ior(false),
KHR_materials_emissive_strength(false),
KHR_materials_emissive_strength(false),
KHR_draco_mesh_compression(false),
FB_ngon_encoding(false),
KHR_texture_basisu(false) {

View File

@ -1313,7 +1313,7 @@ inline void Material::Read(Value &material, Asset &r) {
}
}
if (r.extensionsUsed.KHR_materials_emissive_strength) {
if (r.extensionsUsed.KHR_materials_emissive_strength) {
if (Value *curMaterialEmissiveStrength = FindObject(*extensions, "KHR_materials_emissive_strength")) {
MaterialEmissiveStrength emissiveStrength;
@ -2041,7 +2041,7 @@ inline void Asset::ReadExtensionsUsed(Document &doc) {
CHECK_EXT(KHR_materials_transmission);
CHECK_EXT(KHR_materials_volume);
CHECK_EXT(KHR_materials_ior);
CHECK_EXT(KHR_materials_emissive_strength);
CHECK_EXT(KHR_materials_emissive_strength);
CHECK_EXT(KHR_draco_mesh_compression);
CHECK_EXT(KHR_texture_basisu);

View File

@ -511,7 +511,7 @@ namespace glTF2 {
}
}
if (m.materialEmissiveStrength.isPresent) {
if (m.materialEmissiveStrength.isPresent) {
Value materialEmissiveStrength(rapidjson::Type::kObjectType);
MaterialEmissiveStrength &emissiveStrength = m.materialEmissiveStrength.value;
@ -520,8 +520,8 @@ namespace glTF2 {
WriteFloat(materialEmissiveStrength, emissiveStrength.emissiveStrength, "emissiveStrength", w.mAl);
}
if (!emissiveStrength.ObjectEmpty()) {
exts.AddMember("KHR_materials_emissive_strength", emissiveStrength, w.mAl);
if (!materialEmissiveStrength.ObjectEmpty()) {
exts.AddMember("KHR_materials_emissive_strength", materialEmissiveStrength, w.mAl);
}
}

View File

@ -867,8 +867,8 @@ void glTF2Exporter::ExportMaterials() {
mAsset->extensionsUsed.KHR_materials_ior = true;
m->materialIOR = Nullable<MaterialIOR>(ior);
}
MaterialEmissiveStrength emissiveStrength;
MaterialEmissiveStrength emissiveStrength;
if (GetMatEmissiveStrength(mat, emissiveStrength)) {
mAsset->extensionsUsed.KHR_materials_emissive_strength = true;
m->materialEmissiveStrength = Nullable<MaterialEmissiveStrength>(emissiveStrength);

View File

@ -122,7 +122,7 @@ protected:
bool GetMatTransmission(const aiMaterial &mat, glTF2::MaterialTransmission &transmission);
bool GetMatVolume(const aiMaterial &mat, glTF2::MaterialVolume &volume);
bool GetMatIOR(const aiMaterial &mat, glTF2::MaterialIOR &ior);
bool GetMatEmissiveStrength(const aiMaterial &mat, glTF2::MaterialEmissiveStrength &emissiveStrength);
bool GetMatEmissiveStrength(const aiMaterial &mat, glTF2::MaterialEmissiveStrength &emissiveStrength);
void ExportMetadata();
void ExportMaterials();
void ExportMeshes();

View File

@ -357,7 +357,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
aimat->AddProperty(&ior.ior, 1, AI_MATKEY_REFRACTI);
}
// KHR_materials_emissive_strength
// KHR_materials_emissive_strength
if (mat.materialEmissiveStrength.isPresent) {
MaterialEmissiveStrength &emissiveStrength = mat.materialEmissiveStrength.value;