From a922a097ef5c453bf4bc515494a3ab5f402946e2 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 9 Mar 2020 10:02:11 -0300 Subject: Transform Snap Object: Remove depsgraph when creating context Currently, this change does not bring functional changes. But it is necessary to extend the use of the snap system for gizmos, since, after a Undo, the `depsgraph` pointed by the `snap_context` has its memory invalidated. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D7013 --- source/blender/editors/mesh/editmesh_tools.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e38bb90fd08..a4546780dd9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -420,7 +420,7 @@ void EDBM_project_snap_verts( ED_view3d_init_mats_rv3d(obedit, region->regiondata); struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( - bmain, CTX_data_scene(C), depsgraph, 0, region, CTX_wm_view3d(C)); + bmain, CTX_data_scene(C), 0, region, CTX_wm_view3d(C)); BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { @@ -428,6 +428,7 @@ void EDBM_project_snap_verts( if (ED_view3d_project_float_object(region, eve->co, mval, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) { if (ED_transform_snap_object_project_view3d(snap_context, + depsgraph, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = SNAP_NOT_ACTIVE, -- cgit v1.2.3