summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-04-11 20:34:28 +0200
committerGitHub <noreply@github.com>2022-04-11 20:34:28 +0200
commit3fc7a96cf8cc7f8016fd5190dffd5d74446de4f6 (patch)
tree4bd8c6b2b1421a8065892fb5d26b92c7ccd69390 /scene
parent4afa610017257947b8ee375723af32aab762525a (diff)
parentf9c0a66d6e51cc379eb80d8bc9bc30a172c14d78 (diff)
Merge pull request #60120 from Calinou/environment-editor-ssil-tonemap-hide
Hide SSIL properties when SSIL is disabled in the Environment resource
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/environment.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 78698835fc..d92d34437e 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -189,6 +189,7 @@ void Environment::_update_ambient_light() {
void Environment::set_tonemapper(ToneMapper p_tone_mapper) {
tone_mapper = p_tone_mapper;
_update_tonemap();
+ notify_property_list_changed();
}
Environment::ToneMapper Environment::get_tonemapper() const {
@@ -1049,6 +1050,10 @@ void Environment::_validate_property(PropertyInfo &property) const {
}
}
+ if (property.name == "tonemap_white" && tone_mapper == TONE_MAPPER_LINEAR) {
+ property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+
if (property.name == "glow_intensity" && glow_blend_mode == GLOW_BLEND_MODE_MIX) {
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
}
@@ -1081,6 +1086,7 @@ void Environment::_validate_property(PropertyInfo &property) const {
"auto_exposure_",
"ssr_",
"ssao_",
+ "ssil_",
"sdfgi_",
"glow_",
"adjustment_",