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 • committed by Philipp Oeser
parent 69c56d2819
commit cd804fb2e9

View file

@ -687,6 +687,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) {