diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-06 17:10:21 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-06 17:10:21 +0300 |
commit | df5f06cac2224498c9905ff3ea24811f46c09fa6 (patch) | |
tree | db54fa707c8ea902d49e3a321a265f8d75e70fb8 /source/blender/editors | |
parent | 741f80864e7932b2249f8e89095a26ee59e1884b (diff) |
GPencil: Close Box and Circle primitives with geometry
Before the primitives were closed only with cyclic flag, but this doesn't create geometry for the gap. Now, a new geometry is created using close stroke function to have geometry for sculpt or edit.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 21bee0a9d4e..540dd14fe1d 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -1284,6 +1284,11 @@ static void gpencil_primitive_interaction_end(bContext *C, } } + /* Close stroke with geometry */ + if ((tgpi->type == GP_STROKE_BOX) || (tgpi->type == GP_STROKE_CIRCLE)) { + BKE_gpencil_close_stroke(gps); + } + DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_COPY_ON_WRITE); DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); |