diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-02 10:08:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-02 10:08:48 +0300 |
commit | a5c0964c70cc4c12e574ef7e51fcf6c0b5f38680 (patch) | |
tree | 294c583784a171dcc4cff46ea1a3e034f61960df /source/blender/editors/armature/editarmature_sketch.c | |
parent | 8d8bc24dd501511a1a8adfb011cd3dc447ff77e4 (diff) |
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)
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |