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.
This commit is contained in:
Antonioya
2019-07-06 16:10:21 +02:00
parent 741f80864e
commit df5f06cac2

View File

@@ -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);