Commit: 428e65256e77d2939709b0dfe9c8a31c57a93369
Author: Antonio Vazquez
Date: Sat Mar 14 10:46:28 2020 +0100
Branches: master
https://developer.blender.org/rB428e65256e77d2939709b0dfe9c8a31c57a93369
GPencil: Use Linear color instead of sRGB for Select Vertex Color
The brush color is sRGB but the Vertex Color is linear.
===================================================================
M source/blender/editors/gpencil/gpencil_select.c
===================================================================
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) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs