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
This commit is contained in:
Germano Cavalcante 2021-11-30 10:15:25 -03:00 committed by Germano Cavalcante
parent 0704570721
commit 251c017534
Notes: blender-bot 2023-02-14 04:20:36 +01:00
Referenced by issue #93477, Viewport X-Ray is influencing snapping even in material mode
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 1 additions and 1 deletions

View File

@ -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_GEOM,
.plane_axis = 2,
.color_point = {255, 255, 255, 255},