[Bf-blender-cvs] [b3f664f8fbf] master: GPencil: Fix unreported Vertex Color missing in Outline Draw

Antonio Vazquez noreply at git.blender.org
Mon Jan 9 12:40:40 CET 2023


Commit: b3f664f8fbfe6cc4839447649bed1e156710a692
Author: Antonio Vazquez
Date:   Mon Jan 9 12:40:33 2023 +0100
Branches: master
https://developer.blender.org/rBb3f664f8fbfe6cc4839447649bed1e156710a692

GPencil: Fix unreported Vertex Color missing in Outline Draw

When drawing using the option `Outline` the result stroke
was not using the Vertex Color option and always was converted
using material.

Now the vertex color option is used.

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

M	source/blender/editors/gpencil/gpencil_paint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 9b746d9fd6b..547bda6a1e3 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -962,11 +962,15 @@ static bGPDstroke *gpencil_stroke_to_outline(tGPsdata *p, bGPDstroke *gps)
 
   /* Set pressure constant. */
   gps_perimeter->thickness = max_ii((int)outline_thickness, 1);
+  /* Apply Fill Vertex Color data. */
+  ED_gpencil_fill_vertex_color_set(p->scene->toolsettings, brush, gps);
 
   bGPDspoint *pt;
   for (int i = 0; i < gps_perimeter->totpoints; i++) {
     pt = &gps_perimeter->points[i];
     pt->pressure = 1.0f;
+    /* Apply Point Vertex Color data. */
+    ED_gpencil_point_vertex_color_set(p->scene->toolsettings, brush, pt, NULL);
   }
 
   /* Remove original stroke. */



More information about the Bf-blender-cvs mailing list