diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-21 01:18:25 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-21 01:18:50 +0300 |
commit | dd08d68df835e54ccd1fdf24ae154e461faab685 (patch) | |
tree | 482d5148ed69275a85cffa441a9d68c348214233 /source/blender/editors/transform/transform_snap.c | |
parent | 2db09212fc7fb2506e7c582aedf08f94e3fff8d7 (diff) |
Transform: New Snap Option: Edge Perpendicular
Part of T66420
Option for snapping to the nearest point of a reference coordinate.
The patch also adds Edge Center and Perpendicular snaps to the ruler.
{F7675906}
Reviewers: campbellbarton, brecht
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D5543
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 9d107527833..feaef9a17a1 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -328,6 +328,7 @@ void applyProject(TransInfo *t) .use_occlusion_test = false, }, mval_fl, + NULL, 0, loc, no)) { @@ -999,7 +1000,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) mval[1] = t->mval[1]; if (t->tsnap.mode & (SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE | - SCE_SNAP_MODE_EDGE_MIDPOINT)) { + SCE_SNAP_MODE_EDGE_MIDPOINT | SCE_SNAP_MODE_EDGE_PERPENDICULAR)) { zero_v3(no); /* objects won't set this */ found = snapObjectsTransform(t, mval, &dist_px, loc, no); } @@ -1272,6 +1273,7 @@ bool snapObjectsTransform( .use_occlusion_test = t->scene->toolsettings->snap_mode != SCE_SNAP_MODE_FACE, }, mval, + t->center_global, dist_px, r_loc, r_no); |