diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-17 20:09:41 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-17 21:45:08 +0300 |
commit | aca9a1bac3ad6290345d62b6cfe2fb5223854d22 (patch) | |
tree | 7970230586bda52d7a7819750d72694b62962b31 /source/blender/editors/space_view3d | |
parent | ebcf49fe1a5980b1ac94f13443b0630b99534a25 (diff) |
Transform Snap Refactor: Use enum for cage snap options
This allows the addition of the `SNAP_GEOM_CAGE` option.
Currently unused.
Diffstat (limited to 'source/blender/editors/space_view3d')
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 5f3d71cc190..358373ea4d1 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -5065,7 +5065,7 @@ void ED_view3d_cursor3d_position_rotation(bContext *C, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, - .use_object_edit_cage = false, + .edit_mode_type = SNAP_GEOM_FINAL, .use_occlusion_test = true, }, mval_fl, diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index e202276831c..0d8382d8cdd 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -338,7 +338,7 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, - .use_object_edit_cage = true, + .edit_mode_type = SNAP_GEOM_EDIT, }, mval_fl, NULL, @@ -352,7 +352,7 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph, depsgraph, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, - .use_object_edit_cage = true, + .edit_mode_type = SNAP_GEOM_EDIT, }, ray_start, ray_normal, diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 8172742a756..c7a2c580f36 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -323,7 +323,7 @@ static bool idp_poject_surface_normal(SnapObjectContext *snap_context, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, - .use_object_edit_cage = true, + .edit_mode_type = SNAP_GEOM_EDIT, }, mval_fl, NULL, @@ -941,7 +941,7 @@ static void view3d_interactive_add_calc_plane(bContext *C, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, - .use_object_edit_cage = true, + .edit_mode_type = SNAP_GEOM_EDIT, }, mval_fl, NULL, diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index cbd65e3175d..5007bbf976d 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -407,7 +407,7 @@ static bool walk_floor_distance_get(RegionView3D *rv3d, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, /* Avoid having to convert the edit-mesh to a regular mesh. */ - .use_object_edit_cage = true, + .edit_mode_type = SNAP_GEOM_EDIT, }, ray_start, ray_normal, @@ -982,7 +982,7 @@ static float getVelocityZeroTime(const float gravity, const float velocity) static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) { -#define WALK_ROTATE_RELATIVE_FAC 2.2f /* More is faster, relative to region size. */ +#define WALK_ROTATE_RELATIVE_FAC 2.2f /* More is faster, relative to region size. */ #define WALK_ROTATE_CONSTANT_FAC DEG2RAD(0.15f) /* More is faster, radians per-pixel. */ #define WALK_TOP_LIMIT DEG2RADF(85.0f) #define WALK_BOTTOM_LIMIT DEG2RADF(-80.0f) |