Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <mano-wii>2021-11-30 16:15:25 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-11 13:14:26 +0300
commit9d6680e7f9b7f33e916551cc8b8deb355309838a (patch)
treed119b3e4ee427b39200dfd10d5a5119036f69b62
parent15e4d0f25d75b54d26101d9a3a65272f77241ec8 (diff)
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
-rw-r--r--source/blender/editors/space_view3d/view3d_cursor_snap.c2
1 files changed, 1 insertions, 1 deletions
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),