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/space_view3d/view3d_edit.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/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d278d94738d..498aa3a5230 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -5168,10 +5168,11 @@ bool ED_view3d_snap_from_ray( /* try snap edge, then face if it fails */ ret = snapObjectsRayEx( - scene, NULL, NULL, NULL, obedit, SCE_SNAP_MODE_FACE, - NULL, NULL, + scene, NULL, NULL, NULL, obedit, + NULL, SNAP_ALL, SCE_SNAP_MODE_FACE, ray_start, ray_normal, &ray_dist, - NULL, NULL, r_co, r_no_dummy, SNAP_ALL); + r_co, r_no_dummy, NULL, + NULL, NULL); return ret; } @@ -5216,8 +5217,10 @@ bool ED_view3d_snap_from_region( ray_dist = TRANSFORM_DIST_MAX_RAY; } if (snapObjectsEx( - scene, NULL, v3d, ar, obedit, elem_type[i], - mval, &dist_px, r_co, r_no_ptr, &ray_dist, SNAP_ALL)) + scene, v3d, ar, NULL, obedit, + mval, SNAP_ALL, elem_type[i], + &ray_dist, + r_co, r_no_ptr, &dist_px)) { is_hit = true; } |