Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-09-30 19:45:45 +0300
committerAntonioya <blendergit@gmail.com>2018-09-30 19:45:45 +0300
commit40f10fe11a962e892388ffd1430d33d46874c35a (patch)
treef0cb59971776282f245e662467acca4e632b69de /source/blender
parentda032bdf23d806c6959c4c4c24d6b66e94e54992 (diff)
GP: The primitive line must not enable cyclic mode
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 43166ca17d7..baa8bc5d181 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -175,7 +175,12 @@ static void gp_primitive_set_initdata(bContext *C, tGPDprimitive *tgpi)
/* enable recalculation flag by default */
gps->flag |= GP_STROKE_RECALC_CACHES;
/* the polygon must be closed, so enabled cyclic */
- gps->flag |= GP_STROKE_CYCLIC;
+ if (tgpi->type != GP_STROKE_LINE) {
+ gps->flag |= GP_STROKE_CYCLIC;
+ }
+ else {
+ gps->flag &= ~GP_STROKE_CYCLIC;
+ }
gps->flag |= GP_STROKE_3DSPACE;
gps->mat_nr = BKE_gpencil_get_material_index(tgpi->ob, tgpi->mat) - 1;