Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-05-27 20:30:27 +0300
committerAntonioya <blendergit@gmail.com>2019-05-27 20:30:41 +0300
commit3a8f543b61c0b1bc589556699726058185c28b18 (patch)
tree092a9cfed8f0be12c99d05db20e294939ecbce3d /source/blender/makesrna/intern/rna_gpencil.c
parent4778dfa5684fe1f3b6f323e251ee7a2ec0e1ff6f (diff)
Fix T65190: GPencil stroke not correctly initializated using python API
The value of new gradient fields was wrong.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
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;