From 65e7219706ece1d08c7a1e0c93497235ae6782b1 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Thu, 28 Apr 2022 23:22:16 -0700 Subject: Fix T97097: Color filter saturate affects non-colors Saturation is now tested for > 0.001 instead of != 0. We may wish to turn the limit into an operator property in the future. --- source/blender/editors/sculpt_paint/sculpt_filter_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_color.c') diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index a705f6aa8a8..3b1f80edfd0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -131,7 +131,7 @@ static void color_filter_task_cb(void *__restrict userdata, case COLOR_FILTER_SATURATION: rgb_to_hsv_v(orig_color, hsv_color); - if (hsv_color[1] != 0.0f) { + if (hsv_color[1] > 0.001f) { hsv_color[1] = clamp_f(hsv_color[1] + fade, 0.0f, 1.0f); hsv_to_rgb_v(hsv_color, final_color); } -- cgit v1.2.3