Blender Git Commit Log

Git Commits -> Revision 8939787

Revision 8939787 by Campbell Barton (master)
July 13, 2016, 04:44 (GMT)
Use BLI_bvhtree_walk_dfs for snapping

The snapping functions when performed in the perspective view,
have some problems in the threshold (a distortion) and in the clip plane (the normal is incorrect).
These problems can be only observed when making the snap to edges or to vertices (nearest to ray function).

This patch propose a totally different solution.
The idea is to project the edges of bvh nodes and test the 2d projection of the snap element.

For this it used the BLI_bvhtree_walk_dfs function.

It is important to pay particular attention also to the changes in `ED_transform_snap_object_project_view3d_ex`

Commit Details:

Full Hash: 8939787bfb4b9068408f5fb931354d0fe68faf86
Parent Commit: 7a633d7
Lines Changed: +907, -452

3 Modified Paths:

/source/blender/editors/include/ED_view3d.h (+2, -0) (Diff)
/source/blender/editors/space_view3d/view3d_project.c (+35, -20) (Diff)
/source/blender/editors/transform/transform_snap_object.c (+870, -432) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021