diff options
author | Clay John <claynjohn@gmail.com> | 2022-10-23 17:03:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 17:03:07 -0700 |
commit | 9be3fd640b4e14165141740ec57acc0878f77424 (patch) | |
tree | 8a0a04f5b359672718cd62cc1bb0bcfa852606fb /scene | |
parent | 4134f2a464a3914520755a8780aebac6cb403f6b (diff) | |
parent | 6dcb295a07f522e5dc5616067d7877cc9af3de8e (diff) |
Merge pull request #67513 from Calinou/editor-light2d-fix-shadow-filter-smooth-visibility
Fix Light2D Shadow Filter Smooth property being visible with filter None
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/light_2d.cpp | 5 |
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() { |