diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-12-06 05:29:23 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-12-06 05:40:43 +0300 |
commit | 9a69c456bd856e5ed634c37b657a55da39fa8130 (patch) | |
tree | 111f72acf62a064894dfdf64b546ebfe5e3cab0d /source/blender/editors/space_view3d | |
parent | 3d8dea9ff92d242174613063527f4add98688bac (diff) |
Fix T93388: dropping object on grid in orthogonal view misses the floor plane
`ED_view3d_win_to_3d_on_plane` does not use the `clip_start` and
`clip_end` values of the scene, so the `do_clip` option can be misleading
especially in the orthographic view where the `clip_start` is negative.
For now, don't use the `do_clip` option in orthographic view.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_cursor_snap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index af3425111a3..27a90e04175 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -714,6 +714,7 @@ static void v3d_cursor_snap_update(V3DSnapCursorState *state, float *co_depth = snap_elem ? co : scene->cursor.location; snap_elem &= ~data_intern->snap_elem_hidden; if (snap_elem == 0) { + RegionView3D *rv3d = region->regiondata; float plane[4]; if (state->plane_depth != V3D_PLACE_DEPTH_CURSOR_VIEW) { const float *plane_normal = omat[state->plane_axis]; @@ -721,7 +722,7 @@ static void v3d_cursor_snap_update(V3DSnapCursorState *state, } if ((state->plane_depth == V3D_PLACE_DEPTH_CURSOR_VIEW) || - !ED_view3d_win_to_3d_on_plane(region, plane, mval_fl, true, co)) { + !ED_view3d_win_to_3d_on_plane(region, plane, mval_fl, rv3d->is_persp, co)) { ED_view3d_win_to_3d(v3d, region, co_depth, mval_fl, co); } |