GPencil: Fix unreported mistake in material index for trace imagens

The material index was not used and only worked with new objects.
This commit is contained in:
Antonio Vazquez 2020-10-22 17:04:54 +02:00
parent 73ba3e2a9e
commit 5b35f1ed2b
1 changed files with 1 additions and 1 deletions

View File

@ -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. */