diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2016-04-28 16:10:33 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-05-08 15:53:47 +0300 |
commit | 1d5c71bca74fe3bef40446259d424380f237c27f (patch) | |
tree | 7621cb32fdc803838494d48bfa167c4ce3f7ae3c /source/blender/editors/gpencil/editaction_gpencil.c | |
parent | 0411cfea9d8bfcad6271ccec51bc9a9c641c798c (diff) |
D1705: Fix Grease Pencil Fill for Concave Shapes
Improve filling for concave shapes using a triangulation of the stroke.
The triangulation information is saved in an internal cache and only is
recalculated if the stroke changes.
The triangulation is not saved in .blend file.
Reviewers: aligorith
Maniphest Tasks: T47102
Differential Revision: https://developer.blender.org/D1705
Diffstat (limited to 'source/blender/editors/gpencil/editaction_gpencil.c')
-rw-r--r-- | source/blender/editors/gpencil/editaction_gpencil.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 09a72c10457..a49b3362155 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -460,7 +460,8 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode) /* make a copy of stroke, then of its points array */ gpsn = MEM_dupallocN(gps); gpsn->points = MEM_dupallocN(gps->points); - + /* duplicate triangle information */ + gpsn->triangles = MEM_dupallocN(gps->triangles); /* append stroke to frame */ BLI_addtail(&gpf->strokes, gpsn); } |