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:
authorCharlie Jolly <mistajolly@gmail.com>2018-08-04 10:49:15 +0300
committerAntonioya <blendergit@gmail.com>2018-08-04 10:49:15 +0300
commit27ffd37c15593d4581b8462de435a08766477a4b (patch)
tree92167dc9473cf60a5f9f5c57df34d6703a325155 /source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
parent1ae77fe9c1faf230dc1fa653481d4d9a5aca0d24 (diff)
Fix GP mirror modifier axis
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c23
1 files changed, 12 insertions, 11 deletions
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);