Commit: 27ffd37c15593d4581b8462de435a08766477a4b
Author: Charlie Jolly
Date:   Sat Aug 4 09:49:15 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB27ffd37c15593d4581b8462de435a08766477a4b

Fix GP mirror modifier axis

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

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

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c 
b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
index afecdd34a5c..d4e8e8d3cff 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
@@ -138,17 +138,18 @@ static void generateStrokes(
        int tot_strokes;
        int i;
 
-       /* count strokes to avoid infinite loop after adding new strokes to 
tail of listbase */
-       tot_strokes = BLI_listbase_count(&gpf->strokes);
-
-       for (i = 0, gps = gpf->strokes.first; i < tot_strokes; i++, gps = 
gps->next) {
-               if (is_stroke_affected_by_modifier(
-                           ob, mmd->layername, mmd->pass_index, 1, gpl, gps,
-                           mmd->flag & GP_MIRROR_INVERT_LAYER, mmd->flag & 
GP_MIRROR_INVERT_PASS))
-               {
-                       /* check each axis for mirroring */
-                       for (int xi = 0; xi < 3; ++xi) {
-                               if (mmd->flag & (GP_MIRROR_AXIS_X << xi)) {
+       /* check each axis for mirroring */
+       for (int xi = 0; xi < 3; ++xi) {
+               if (mmd->flag & (GP_MIRROR_AXIS_X << xi)) {
+
+                       /* count strokes to avoid infinite loop after adding 
new strokes to tail of listbase */
+                       tot_strokes = BLI_listbase_count(&gpf->strokes);
+
+                       for (i = 0, gps = gpf->strokes.first; i < tot_strokes; 
i++, gps = gps->next) {
+                               if (is_stroke_affected_by_modifier(
+                                       ob, mmd->layername, mmd->pass_index, 1, 
gpl, gps,
+                                       mmd->flag & GP_MIRROR_INVERT_LAYER, 
mmd->flag & GP_MIRROR_INVERT_PASS))
+                               {
                                        /* clip before duplicate */
                                        clip_stroke(mmd, gps);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to