summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-17 01:31:55 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-17 01:35:10 +0200
commit6dcb295a07f522e5dc5616067d7877cc9af3de8e (patch)
tree5ac5801c43216fecef677e973e4e57469e20f53e /scene/2d
parentdc4b6165962536b53c4c1471fcf0be43c70e2335 (diff)
Fix Light2D Shadow Filter Smooth property being visible with filter None
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/light_2d.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 80169bc80c..78b5199358 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() {