fixed indentation
parent
852ea8325c
commit
945d93b46a
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue