3fc29d80802392732e00de0a1c055de48239cd48
Fix snapping issues caused by commit 1c77779160, where a mesh
representing the edited mesh was introduced.
Mesh snap to vertex now works in the following order:
- Snap to vertices of visible triangles
- Snap to vertices of loose edges
- Snap to loose vertices
The problem arises because in editing mode, faces whose vertices are
being transformed are ignored, marked as hidden in the snap, resulting
in the loss of some vertices in triangles.
The solution involves considering the edges and vertices of hidden
faces as loose elements since, despite being connected to faces, they
are still visible to snap. Two new types of BVHTree were created for
this purpose:
- BVHTREE_FROM_LOOSEVERTS_NO_HIDDEN
- BVHTREE_FROM_LOOSEEDGES_NO_HIDDEN
This modification addresses two related issues:
- snapping in edit mode to vertices and edges of a face being
transformed
- snapping to mesh with hidden loose elements
Optionally, the first issue could be tackled separately by generating
BVHTrees within the snap system itself and storing them in a
`SnapCache_EditMesh *em_cache`, then passing this cache as a parameter
to the `snap_object_mesh` function.
Pull Request: https://projects.blender.org/blender/blender/pulls/120270
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
