From 97923d9b9892b422cfd4c5a795258a34e44c09e8 Mon Sep 17 00:00:00 2001 From: Falk David Date: Thu, 29 Apr 2021 16:49:57 +0200 Subject: GPencil: glow fx, add threshold value color mode This patch adds a threshold value to the glow effect in color mode. Currently, the threshold is hardcoded to 5%. You can select a color and specify a higher threshold to include similar colors in the effect. Note: depends on D10670 Reviewed By: #grease_pencil, pepeland Differential Revision: https://developer.blender.org/D10672 --- source/blender/shader_fx/intern/FX_shader_glow.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/shader_fx') diff --git a/source/blender/shader_fx/intern/FX_shader_glow.c b/source/blender/shader_fx/intern/FX_shader_glow.c index 30eaa35a049..fc75771cd62 100644 --- a/source/blender/shader_fx/intern/FX_shader_glow.c +++ b/source/blender/shader_fx/intern/FX_shader_glow.c @@ -71,12 +71,11 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel) uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE); - if (mode == eShaderFxGlowMode_Luminance) { - uiItemR(layout, ptr, "threshold", 0, NULL, ICON_NONE); - } - else { + uiItemR(layout, ptr, "threshold", 0, NULL, ICON_NONE); + if (mode == eShaderFxGlowMode_Color) { uiItemR(layout, ptr, "select_color", 0, NULL, ICON_NONE); } + uiItemR(layout, ptr, "glow_color", 0, NULL, ICON_NONE); uiItemS(layout); -- cgit v1.2.3