diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-14 12:46:28 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-14 12:46:28 +0300 |
commit | 428e65256e77d2939709b0dfe9c8a31c57a93369 (patch) | |
tree | 6e474f81d8f467ff698547d8529051ea182e8650 | |
parent | b8211a4d7c90447ea88d96ff2630a2774e0921b3 (diff) |
GPencil: Use Linear color instead of sRGB for Select Vertex Color
The brush color is sRGB but the Vertex Color is linear.
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 175b7b8c196..12d4c7c4329 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1693,8 +1693,9 @@ static int gpencil_select_vertex_color_exec(bContext *C, wmOperator *op) Brush *brush = paint->brush; bool done = false; - float hsv_brush[3], hsv_stroke[3]; - rgb_to_hsv_compat_v(brush->rgb, hsv_brush); + float hsv_brush[3], hsv_stroke[3], linear_color[3]; + srgb_to_linearrgb_v3_v3(linear_color, brush->rgb); + rgb_to_hsv_compat_v(linear_color, hsv_brush); /* Select any visible stroke that uses this color */ CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) { |