From 1948681440c011ae3008cd5d2a575eb6d45dc7ec Mon Sep 17 00:00:00 2001 From: Antonioya Date: Sun, 26 Aug 2018 16:39:01 +0200 Subject: GP: Reduce weight paint data memory footprint Before, the weight data array was created always, but now only is added when a weight value is assigned. This change was suggested by algorithm, and both agreed it was good idea. --- source/blender/editors/space_view3d/view3d_gizmo_ruler.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/editors/space_view3d/view3d_gizmo_ruler.c') diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index 5853fa6e3b3..938b4c45181 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -422,7 +422,6 @@ static bool view3d_ruler_to_gpencil(bContext *C, wmGizmoGroup *gzgroup) if (ruler_item->flag & RULERITEM_USE_ANGLE) { gps->totpoints = 3; pt = gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); - gps->dvert = MEM_callocN(sizeof(MDeformVert) * gps->totpoints, "gp_stroke_weights"); for (j = 0; j < 3; j++) { copy_v3_v3(&pt->x, ruler_item->co[j]); pt->pressure = 1.0f; @@ -433,7 +432,6 @@ static bool view3d_ruler_to_gpencil(bContext *C, wmGizmoGroup *gzgroup) else { gps->totpoints = 2; pt = gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); - gps->dvert = MEM_callocN(sizeof(MDeformVert) * gps->totpoints, "gp_stroke_weights"); for (j = 0; j < 3; j += 2) { copy_v3_v3(&pt->x, ruler_item->co[j]); pt->pressure = 1.0f; -- cgit v1.2.3