[Bf-blender-cvs] [5b35f1ed2b8] blender-v2.91-release: GPencil: Fix unreported mistake in material index for trace imagens

Antonio Vazquez noreply at git.blender.org
Thu Oct 22 17:05:15 CEST 2020


Commit: 5b35f1ed2b8362bbf6935b1df2829df00aef0b72
Author: Antonio Vazquez
Date:   Thu Oct 22 17:04:54 2020 +0200
Branches: blender-v2.91-release
https://developer.blender.org/rB5b35f1ed2b8362bbf6935b1df2829df00aef0b72

GPencil: Fix unreported mistake in material index for trace imagens

The material index was not used and only worked with new objects.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_trace_utils.c b/source/blender/editors/gpencil/gpencil_trace_utils.c
index 05973afe80c..544cb4fef1e 100644
--- a/source/blender/editors/gpencil/gpencil_trace_utils.c
+++ b/source/blender/editors/gpencil/gpencil_trace_utils.c
@@ -294,7 +294,7 @@ void ED_gpencil_trace_data_to_strokes(Main *bmain,
     n = path->curve.n;
     tag = path->curve.tag;
     c = path->curve.c;
-    int mat_idx = path->sign == '+' ? 0 : 1;
+    int mat_idx = path->sign == '+' ? mat_fill_idx : mat_mask_idx;
     /* Create a new stroke. */
     bGPDstroke *gps = BKE_gpencil_stroke_add(gpf, mat_idx, 0, thickness, false);
     /* Last point that is equals to start point. */



More information about the Bf-blender-cvs mailing list