From a5c0964c70cc4c12e574ef7e51fcf6c0b5f38680 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 2 Dec 2015 18:08:48 +1100 Subject: Cleanup: transform snap arguments This was getting very hard to follow, - mixing input/output args. - mixing arg order between functions. - arg names (mode, snap_mode) rename to (snap_to, snap_select) --- source/blender/editors/armature/editarmature_sketch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 9319ccf3b13..87d75aa8fad 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -982,7 +982,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S mvalf[0] = dd->mval[0]; mvalf[1] = dd->mval[1]; - peelObjectsContext(C, &sketch->depth_peels, mvalf, SNAP_ALL); + peelObjectsContext(C, mvalf, SNAP_ALL, &sketch->depth_peels); if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) { last_p = stk->points[stk->nb_points - 1].p; @@ -1086,7 +1086,9 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S mval[1] = dd->mval[1]; /* try to snap to closer object */ - found = snapObjectsContext(C, mval, &dist_px, vec, no, SNAP_NOT_SELECTED); + found = snapObjectsContext( + C, mval, SNAP_NOT_SELECTED, + vec, no, &dist_px); if (found == 1) { pt->type = dd->type; pt->mode = PT_SNAP; -- cgit v1.2.3