[Bf-blender-cvs] [9d6680e7f9b] blender-v3.0-release: Fix T93477: Viewport X-Ray is influencing snapping even in material mode

Germano Cavalcante noreply at git.blender.org
Tue Jan 11 11:30:55 CET 2022


Commit: 9d6680e7f9b7f33e916551cc8b8deb355309838a
Author: Germano Cavalcante
Date:   Tue Nov 30 10:15:25 2021 -0300
Branches: blender-v3.0-release
https://developer.blender.org/rB9d6680e7f9b7f33e916551cc8b8deb355309838a

Fix T93477: Viewport X-Ray is influencing snapping even in material mode

The default snap behavior to perform on tools and cursors is to the
final geometry and not edited geometry.

In snapping to edited geometry, there are some specific behaviors that
are not convenient in some cases. For example the general occlusion
test of X-Ray geometries during dragdrop.

This fix also resolves a regression for tools like measure and placement
that were also ignoring the snap to face in x-ray mode.

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

===================================================================

M	source/blender/editors/space_view3d/view3d_cursor_snap.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c
index 747d5248056..edff607cf1f 100644
--- a/source/blender/editors/space_view3d/view3d_cursor_snap.c
+++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c
@@ -94,7 +94,7 @@ typedef struct SnapCursorDataIntern {
 } SnapCursorDataIntern;
 
 static SnapCursorDataIntern g_data_intern = {
-    .state_default = {.prevpoint = NULL,
+    .state_default = {.flag = V3D_SNAPCURSOR_SNAP_EDIT_GEOM_FINAL,
                       .snap_elem_force = (SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE |
                                           SCE_SNAP_MODE_FACE | SCE_SNAP_MODE_EDGE_PERPENDICULAR |
                                           SCE_SNAP_MODE_EDGE_MIDPOINT),



More information about the Bf-blender-cvs mailing list