diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-13 07:02:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-13 07:07:10 +0300 |
commit | 3437cd9ac22e0a5ae611454ae6f36f24697774c8 (patch) | |
tree | b800b58228718aaeb72139d0b04ce6f33e777b55 /source/blender/editors/gpencil/gpencil_select.c | |
parent | 184ab749c38a6e90744022a030bec6a6ee584a0a (diff) |
Cleanup: add arg to GP_EDITABLE_STROKES macro
Without this, we use arguments defined in the macro
making code hard to read.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_select.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index c2a5c5cfc38..815f420f532 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1001,12 +1001,12 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op) /* find visible strokes, and select if hit */ - GP_EDITABLE_STROKES_BEGIN(C, gpl, gps) + GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) { changed |= gp_stroke_do_circle_sel( - gps, &gsc, mx, my, radius, select, &rect, diff_mat, selectmode); + gps, &gsc, mx, my, radius, select, &rect, gpstroke_iter.diff_mat, selectmode); } - GP_EDITABLE_STROKES_END; + GP_EDITABLE_STROKES_END(gpstroke_iter); /* updates */ if (changed) { @@ -1099,7 +1099,7 @@ static int gpencil_generic_select_exec( } /* select/deselect points */ - GP_EDITABLE_STROKES_BEGIN(C, gpl, gps) + GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) { bGPDspoint *pt; @@ -1107,7 +1107,7 @@ static int gpencil_generic_select_exec( bool hit = false; for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { /* convert point coords to screenspace */ - const bool is_inside = is_inside_fn(gps, pt, &gsc, diff_mat, user_data); + const bool is_inside = is_inside_fn(gps, pt, &gsc, gpstroke_iter.diff_mat, user_data); if (strokemode == false) { const bool is_select = (pt->flag & GP_SPOINT_SELECT) != 0; @@ -1146,7 +1146,7 @@ static int gpencil_generic_select_exec( /* Ensure that stroke selection is in sync with its points */ BKE_gpencil_stroke_sync_selection(gps); } - GP_EDITABLE_STROKES_END; + GP_EDITABLE_STROKES_END(gpstroke_iter); /* if paint mode,delete selected points */ if (gpd->flag & GP_DATA_STROKE_PAINTMODE) { @@ -1341,7 +1341,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op) /* First Pass: Find stroke point which gets hit */ /* XXX: maybe we should go from the top of the stack down instead... */ - GP_EDITABLE_STROKES_BEGIN(C, gpl, gps) + GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) { bGPDspoint *pt; int i; @@ -1351,7 +1351,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op) int xy[2]; bGPDspoint pt2; - gp_point_to_parent_space(pt, diff_mat, &pt2); + gp_point_to_parent_space(pt, gpstroke_iter.diff_mat, &pt2); gp_point_to_xy(&gsc, gps, &pt2, &xy[0], &xy[1]); /* do boundbox check first */ @@ -1370,7 +1370,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op) } } } - GP_EDITABLE_STROKES_END; + GP_EDITABLE_STROKES_END(gpstroke_iter); /* Abort if nothing hit... */ if (ELEM(NULL, hit_stroke, hit_point)) { |