From 3a8f543b61c0b1bc589556699726058185c28b18 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 27 May 2019 19:30:27 +0200 Subject: Fix T65190: GPencil stroke not correctly initializated using python API The value of new gradient fields was wrong. --- source/blender/makesrna/intern/rna_gpencil.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesrna/intern/rna_gpencil.c') diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index cf6d85adc62..a78eebd2618 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -652,6 +652,8 @@ static void rna_GPencil_stroke_point_pop(ID *id, static bGPDstroke *rna_GPencil_stroke_new(bGPDframe *frame) { bGPDstroke *stroke = MEM_callocN(sizeof(bGPDstroke), "gp_stroke"); + stroke->gradient_f = 1.0f; + ARRAY_SET_ITEMS(stroke->gradient_s, 1.0f, 1.0f); BLI_addtail(&frame->strokes, stroke); return stroke; -- cgit v1.2.3