[Bf-blender-cvs] [e296d58cf22] master: GPencil: Subdivide Cyclic section of strokes in modifier

Antonio Vazquez noreply at git.blender.org
Wed Oct 21 19:29:30 CEST 2020


Commit: e296d58cf22076985c7a182498e7f1a4e3edf7e0
Author: Antonio Vazquez
Date:   Fri Sep 25 17:08:07 2020 +0200
Branches: master
https://developer.blender.org/rBe296d58cf22076985c7a182498e7f1a4e3edf7e0

GPencil: Subdivide Cyclic section of strokes  in modifier

When use subdivision modifier, the close section of the stroke must be subdivided too.

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 6eb12974408..8f17be97710 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -101,6 +101,11 @@ static void deformStroke(GpencilModifierData *md,
   }
 
   BKE_gpencil_stroke_subdivide(gps, mmd->level, mmd->type);
+
+  /* If the stroke is cyclic, must generate the closing geometry. */
+  if (gps->flag & GP_STROKE_CYCLIC) {
+    BKE_gpencil_stroke_close(gps);
+  }
 }
 
 static void bakeModifier(struct Main *UNUSED(bmain),



More information about the Bf-blender-cvs mailing list