From 6dcb295a07f522e5dc5616067d7877cc9af3de8e Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 17 Oct 2022 01:31:55 +0200 Subject: [PATCH] Fix Light2D Shadow Filter Smooth property being visible with filter None --- scene/2d/light_2d.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 80169bc80cc..78b51993588 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -172,6 +172,7 @@ void Light2D::set_shadow_filter(ShadowFilter p_filter) { ERR_FAIL_INDEX(p_filter, SHADOW_FILTER_MAX); shadow_filter = p_filter; RS::get_singleton()->canvas_light_set_shadow_filter(canvas_light, RS::CanvasLightShadowFilter(p_filter)); + notify_property_list_changed(); } Light2D::ShadowFilter Light2D::get_shadow_filter() const { @@ -231,6 +232,10 @@ void Light2D::_validate_property(PropertyInfo &p_property) const { if (!shadow && (p_property.name == "shadow_color" || p_property.name == "shadow_filter" || p_property.name == "shadow_filter_smooth" || p_property.name == "shadow_item_cull_mask")) { p_property.usage = PROPERTY_USAGE_NO_EDITOR; } + + if (shadow && p_property.name == "shadow_filter_smooth" && shadow_filter == SHADOW_FILTER_NONE) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; + } } void Light2D::_bind_methods() {