Fix T94392: 3D Cursor surface projection onto hidden geometry

Regression introduced in rB098008f42d8127d9b60717c7059d3c55a3bfada7

Previously the selected geometry was ignored along with the hidden one.

The mentioned commit caused neither the hidden nor the selected one to be ignored.

But hidden geometry needs to be ignored.
This commit is contained in:
Germano Cavalcante 2022-01-03 11:51:41 -03:00
parent a230445cae
commit 8189471912
Notes: blender-bot 2023-02-14 06:54:28 +01:00
Referenced by issue #94392, 3D Cursor surface projection onto hidden faces
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 9 additions and 0 deletions

View File

@ -693,6 +693,15 @@ static void initSnappingMode(TransInfo *t)
bm_face_is_snap_target,
POINTER_FROM_UINT((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
}
else {
/* Ignore hidden geometry in the general case. */
ED_transform_snap_object_context_set_editmesh_callbacks(
t->tsnap.object_context,
(bool (*)(BMVert *, void *))BM_elem_cb_check_hflag_disabled,
(bool (*)(BMEdge *, void *))BM_elem_cb_check_hflag_disabled,
(bool (*)(BMFace *, void *))BM_elem_cb_check_hflag_disabled,
POINTER_FROM_UINT(BM_ELEM_HIDDEN));
}
}
}
else if (t->spacetype == SPACE_SEQ) {