summaryrefslogtreecommitdiff
path: root/scene/3d/light_3d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-02 14:15:25 +0100
committerGitHub <noreply@github.com>2021-03-02 14:15:25 +0100
commit5895cd4c4fe8cf04a7109d52388be46f619b56f1 (patch)
treef9531cd1b9dd5afab64537a1e5e43d00dce14e56 /scene/3d/light_3d.cpp
parent3fc5ae02aa6f50b153a1b5222046915054b88284 (diff)
parent70304f8633c8cf8faa530dadf648ecfcabf80655 (diff)
Merge pull request #36202 from YeldhamDev/sprite_region_hide
Hide extra options from various nodes if they're not enabled
Diffstat (limited to 'scene/3d/light_3d.cpp')
-rw-r--r--scene/3d/light_3d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp
index b0a10b5547..87f54022b3 100644
--- a/scene/3d/light_3d.cpp
+++ b/scene/3d/light_3d.cpp
@@ -65,6 +65,8 @@ void Light3D::set_shadow(bool p_enable) {
if (type == RenderingServer::LIGHT_SPOT || type == RenderingServer::LIGHT_OMNI) {
update_configuration_warning();
}
+
+ notify_property_list_changed();
}
bool Light3D::has_shadow() const {
@@ -202,6 +204,10 @@ bool Light3D::is_editor_only() const {
}
void Light3D::_validate_property(PropertyInfo &property) const {
+ if (!shadow && (property.name == "shadow_color" || property.name == "shadow_color" || property.name == "shadow_bias" || property.name == "shadow_normal_bias" || property.name == "shadow_reverse_cull_face" || property.name == "shadow_transmittance_bias" || property.name == "shadow_blur")) {
+ property.usage = PROPERTY_USAGE_NOEDITOR;
+ }
+
if (get_light_type() == RS::LIGHT_DIRECTIONAL && property.name == "light_size") {
property.usage = 0;
}