Commit: ae3116b49d0176267ee4f28cc25f52c84c9e4451
Author: Antonioya
Date:   Thu Jul 4 23:16:14 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBae3116b49d0176267ee4f28cc25f52c84c9e4451

GPencil: Fix error in Convert to Stroke with materials

The material color was checked in linear, but the gpencil material is sRGB.

===================================================================

M       source/blender/blenkernel/intern/gpencil.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil.c 
b/source/blender/blenkernel/intern/gpencil.c
index 6b875507e44..4630289d6ee 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2049,6 +2049,9 @@ static int gpencil_check_same_material_color(Object 
*ob_gp, Material *mat_cu, Ma
 {
   Material *ma = NULL;
   float color_cu[4] = {mat_cu->r, mat_cu->g, mat_cu->b, mat_cu->a};
+  linearrgb_to_srgb_v3_v3(color_cu, &mat_cu->r);
+  color_cu[3] = 1.0f;
+
   for (int i = 1; i <= ob_gp->totcol; i++) {
     ma = give_current_material(ob_gp, i);
     MaterialGPencilStyle *gp_style = ma->gp_style;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to