Skip to content

Commit 4bd2180

Browse files
authored
Merge pull request #520 from sdslabs/fix-post-processing
Minor fix in Post Processing
2 parents a3e5161 + eb6329f commit 4bd2180

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

rootex/framework/components/visual/camera_component.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ void from_json(const JSON::json& j, PostProcessingDetails& p)
8080
p.toneMapOperator = j.at("toneMapOperator");
8181
p.toneMapTransferFunction = j.at("toneMapTransferFunction");
8282
p.toneMapWhiteNits = j.at("toneMapWhiteNits");
83-
for (auto&& customPostProcessing : j.at("customPostProcessing").items())
83+
if (j.contains("customPostProcessing"))
8484
{
85-
p.customPostProcessing.insert({ (String)customPostProcessing.key(), (bool)customPostProcessing.value() });
86-
PostProcessSystem::GetSingleton()->addCustomPostProcessing(customPostProcessing.key());
85+
for (auto&& customPostProcessing : j.at("customPostProcessing").items())
86+
{
87+
p.customPostProcessing.insert({ (String)customPostProcessing.key(), (bool)customPostProcessing.value() });
88+
PostProcessSystem::GetSingleton()->addCustomPostProcessing(customPostProcessing.key());
89+
}
8790
}
8891
}
8992

0 commit comments

Comments
 (0)