diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-01-07 14:14:36 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-01-07 16:14:19 +0300 |
commit | a99f6e5df18d4f8bf480bf69d439f86311794fc1 (patch) | |
tree | 7e5deb9bc3fb3861334bde323b8fc722ca13e92f /source | |
parent | 122a0afa96300c56619964e5b57052bc6b6e814b (diff) |
GPencil: Remove memory allocation for triangles
This will be replaced later, so it's not logic allocate now.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 4744d2cf1c0..98c8f46970f 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -494,7 +494,7 @@ bGPDstroke *BKE_gpencil_add_stroke(bGPDframe *gpf, int mat_idx, int totpoints, s gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); /* initialize triangle memory to dummy data */ - gps->triangles = MEM_callocN(sizeof(bGPDtriangle), "GP Stroke triangulation"); + gps->triangles = NULL; gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 67830d0e501..6a91417e7f3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1173,7 +1173,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); /* initialize triangle memory to dummy data */ - gps->triangles = MEM_callocN(sizeof(bGPDtriangle), "GP Stroke triangulation"); + gps->triangles = NULL; gps->flag |= GP_STROKE_RECALC_GEOMETRY; gps->tot_triangles = 0; /* drawing batch cache is dirty now */ |