diff options
author | Antonioya <blendergit@gmail.com> | 2019-05-27 20:30:27 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-05-27 20:30:41 +0300 |
commit | 3a8f543b61c0b1bc589556699726058185c28b18 (patch) | |
tree | 092a9cfed8f0be12c99d05db20e294939ecbce3d /source/blender | |
parent | 4778dfa5684fe1f3b6f323e251ee7a2ec0e1ff6f (diff) |
Fix T65190: GPencil stroke not correctly initializated using python API
The value of new gradient fields was wrong.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |