diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-07 05:49:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-07 05:53:03 +0300 |
commit | a8d11995bfcb16d2ecdfdb196e0ed708d8cf5c36 (patch) | |
tree | c6a885ab1f2814b1cad27344e819705b232360a7 /source/blender/editors | |
parent | 592e245a90e250167956e95cc949577ecd4430a1 (diff) |
BMesh: remove BMEditMesh.ob use for vert coord access, projection
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 246dba57bb5..e398e5def9e 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -295,6 +295,7 @@ void ED_keymap_mesh(struct wmKeyConfig *keyconf); void EDBM_project_snap_verts(struct bContext *C, struct Depsgraph *depsgraph, struct ARegion *ar, + struct Object *obedit, struct BMEditMesh *em); /* editface.c */ diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index c1c8a208471..5496362024d 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -820,7 +820,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w /* also project the source, for retopo workflow */ if (use_proj) { - EDBM_project_snap_verts(C, depsgraph, vc.ar, vc.em); + EDBM_project_snap_verts(C, depsgraph, vc.ar, vc.obedit, vc.em); } } @@ -853,7 +853,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w } if (use_proj) { - EDBM_project_snap_verts(C, depsgraph, vc.ar, vc.em); + EDBM_project_snap_verts(C, depsgraph, vc.ar, vc.obedit, vc.em); } /* This normally happens when pushing undo but modal operators diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 4c4aa4214b2..1b6827dac87 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2658,11 +2658,11 @@ static void knifetool_init_bmbvh(KnifeTool_OpData *kcd) BM_mesh_elem_index_ensure(kcd->em->bm, BM_VERT); Scene *scene_eval = (Scene *)DEG_get_evaluated_id(kcd->vc.depsgraph, &kcd->scene->id); - Object *obedit_eval = (Object *)DEG_get_evaluated_id(kcd->vc.depsgraph, &kcd->em->ob->id); + Object *obedit_eval = (Object *)DEG_get_evaluated_id(kcd->vc.depsgraph, &kcd->ob->id); BMEditMesh *em_eval = BKE_editmesh_from_object(obedit_eval); kcd->cagecos = (const float(*)[3])BKE_editmesh_vert_coords_alloc( - kcd->vc.depsgraph, em_eval, scene_eval, NULL); + kcd->vc.depsgraph, em_eval, scene_eval, obedit_eval, NULL); kcd->bmbvh = BKE_bmbvh_new_from_editmesh( kcd->em, diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index abc0d258e55..a795966693f 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -411,10 +411,10 @@ void MESH_OT_unsubdivide(wmOperatorType *ot) ot->srna, "iterations", 2, 1, 1000, "Iterations", "Number of times to unsubdivide", 1, 100); } -void EDBM_project_snap_verts(bContext *C, Depsgraph *depsgraph, ARegion *ar, BMEditMesh *em) +void EDBM_project_snap_verts( + bContext *C, Depsgraph *depsgraph, ARegion *ar, Object *obedit, BMEditMesh *em) { Main *bmain = CTX_data_main(C); - Object *obedit = em->ob; BMIter iter; BMVert *eve; |