Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-09-04 19:28:31 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-09-04 19:28:54 +0300
commit079bd115563640b81cccba645d15b6b55efd3b8e (patch)
treeeee03107da95ddf37e23e85170d32f91b311cd71
parentb225a7c4705104245c2267101adec2f2ee2fe20a (diff)
Fix T91143: Gpencil Set Vertex Color not using Linear
The color was not converted to Linear from Brush color.
-rw-r--r--source/blender/editors/gpencil/gpencil_vertex_ops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_vertex_ops.c b/source/blender/editors/gpencil/gpencil_vertex_ops.c
index 402bccce2f7..5c3a7cf9e6f 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_ops.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_ops.c
@@ -588,6 +588,7 @@ static int gpencil_vertexpaint_set_exec(bContext *C, wmOperator *op)
changed = true;
copy_v3_v3(gps->vert_color_fill, brush->rgb);
gps->vert_color_fill[3] = factor;
+ srgb_to_linearrgb_v4(gps->vert_color_fill, gps->vert_color_fill);
}
/* Stroke points. */
@@ -596,10 +597,13 @@ static int gpencil_vertexpaint_set_exec(bContext *C, wmOperator *op)
int i;
bGPDspoint *pt;
+ float color[4];
+ copy_v3_v3(color, brush->rgb);
+ color[3] = factor;
+ srgb_to_linearrgb_v4(color, color);
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
if ((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) {
- copy_v3_v3(pt->vert_color, brush->rgb);
- pt->vert_color[3] = factor;
+ copy_v3_v3(pt->vert_color, color);
}
}
}