[Bf-blender-cvs] [40f10fe11a9] blender2.8: GP: The primitive line must not enable cyclic mode
Antonioya
noreply at git.blender.org
Sun Sep 30 18:45:53 CEST 2018
Commit: 40f10fe11a962e892388ffd1430d33d46874c35a
Author: Antonioya
Date: Sun Sep 30 18:45:45 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB40f10fe11a962e892388ffd1430d33d46874c35a
GP: The primitive line must not enable cyclic mode
===================================================================
M source/blender/editors/gpencil/gpencil_primitive.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list