Germano Cavalcante 3fc29d8080 Fix #120239: Snap in edit mode is ignoring some self elements
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
2024-04-18 16:48:19 +02:00
2024-03-16 19:45:51 +01:00
2024-04-16 23:11:16 +02:00
2023-12-08 13:28:13 +11:00
2024-03-14 18:12:51 +01:00
2024-03-07 14:07:39 +11:00

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.

Blender screenshot

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
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%