diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2016-06-03 09:54:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-03 09:56:16 +0300 |
commit | e370806b38388bb501ab99f9eb65fe2ff10d9133 (patch) | |
tree | 3e2ac56c81e0073ea9e62e528268ec02717c0f47 /source/blender/editors/armature/editarmature_sketch.c | |
parent | e9363483caad3a038237489eea52443b20587bfd (diff) |
Cleanup & simplify snapping functions
- the name of the enumerator `SNAP_NOT_OBEDIT` was changed to `SNAP_NOT_ACTIVE`.
- the parameter `snap_to_flag` was moved to outside `SnapObjectParams`.
- the member `use_object_edit` was renamed to `use_object_edit_cage`.
- added the arg `params` in `ED_transform_snap_object_project_ray`.
- simplifications in the loop of the function `snapObjectsRay`.
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 5530e293edd..cc4c1809fbc 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -980,7 +980,11 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) { float size; if (peelObjectsSnapContext( - snap_context, mvalf, SNAP_ALL, + snap_context, mvalf, + &(const struct SnapObjectParams){ + .snap_select = SNAP_NOT_SELECTED, + .use_object_edit_cage = false, + }, (ts->snap_flag & SCE_SNAP_PEEL_OBJECT) != 0, loc, dummy_no, &size)) { @@ -1017,9 +1021,10 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S { if (ED_transform_snap_object_project_view3d( snap_context, + ts->snap_mode, &(const struct SnapObjectParams){ .snap_select = SNAP_NOT_SELECTED, - .snap_to = ts->snap_mode, + .use_object_edit_cage = false, }, mvalf, &dist_px, NULL, loc, dummy_no)) |