Blender Git Loki

Git Commits -> Revision 77089a3

Revision 77089a3 by Bastien Montagne (master)
January 29, 2014, 19:10 (GMT)
Fix T38358: Face snapping fails on Orthographic view

Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews.
The loss of precision on the ray location induced by this can lead to face snapping failures.

Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back
to the found distance the diff to the real start point once detection is done (as we need all hit distances
from all tested objects to be relative to a common point!).

Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer
from this issue.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D268

Commit Details:

Full Hash: 77089a3bf20319be87a434750656206449c04dbc
Parent Commit: 95e153a
Lines Changed: +243, -177

5 Modified Paths:

/source/blender/blenkernel/BKE_object.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/object.c (+9, -3) (Diff)
/source/blender/editors/include/ED_view3d.h (+2, -0) (Diff)
/source/blender/editors/space_view3d/view3d_project.c (+86, -36) (Diff)
/source/blender/editors/transform/transform_snap.c (+144, -137) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021