From e370806b38388bb501ab99f9eb65fe2ff10d9133 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Fri, 3 Jun 2016 16:54:58 +1000 Subject: 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`. --- source/blender/editors/include/ED_transform.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/include/ED_transform.h') diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 933f480a554..ebd2a3dcb7a 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -45,6 +45,7 @@ struct wmKeyMap; struct wmOperatorType; struct Main; struct SnapObjectContext; +struct SnapObjectParams; void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid); void transform_operatortypes(void); @@ -161,25 +162,27 @@ void BIF_draw_manipulator(const struct bContext *C); typedef enum SnapSelect { SNAP_ALL = 0, SNAP_NOT_SELECTED = 1, - SNAP_NOT_OBEDIT = 2 + SNAP_NOT_ACTIVE = 2, } SnapSelect; #define SNAP_MIN_DISTANCE 30 bool peelObjectsTransform( - struct TransInfo *t, const float mval[2], - SnapSelect snap_select, bool use_peel_object, + struct TransInfo *t, + const float mval[2], + const bool use_peel_object, /* return args */ float r_loc[3], float r_no[3], float *r_thickness); bool peelObjectsSnapContext( struct SnapObjectContext *sctx, const float mval[2], - SnapSelect snap_select, bool use_peel_object, + const struct SnapObjectParams *params, + const bool use_peel_object, /* return args */ float r_loc[3], float r_no[3], float *r_thickness); bool snapObjectsTransform( - struct TransInfo *t, const float mval[2], SnapSelect snap_select, + struct TransInfo *t, const float mval[2], float *dist_px, /* return args */ float r_loc[3], float r_no[3]); -- cgit v1.2.3