[Bf-blender-cvs] [2ffbbfd67e6] experimental_gp_weight: Fix add primitive operator

Antonio Vazquez noreply at git.blender.org
Wed May 16 16:46:04 CEST 2018


Commit: 2ffbbfd67e62cfe7dc135fdcf1e1467ac2f2d8e0
Author: Antonio Vazquez
Date:   Wed May 16 16:45:59 2018 +0200
Branches: experimental_gp_weight
https://developer.blender.org/rB2ffbbfd67e62cfe7dc135fdcf1e1467ac2f2d8e0

Fix add primitive operator

The weight array was not reallocated.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 4257d6197a9..cb1561940c3 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -314,6 +314,7 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
 	/* realloc points to new size */
 	/* TODO: only do this if the size has changed? */
 	gps->points = MEM_reallocN(gps->points, sizeof(bGPDspoint) * tgpi->tot_edges);
+	gps->dvert = MEM_reallocN(gps->dvert, sizeof(MDeformVert) * tgpi->tot_edges);
 	gps->totpoints = tgpi->tot_edges;
 	
 	/* compute screen-space coordinates for points */



More information about the Bf-blender-cvs mailing list