diff options
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index e398e5def9e..e1330f8b9e7 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -154,8 +154,12 @@ void EDBM_automerge_and_split(struct Object *ob, void ED_mesh_undosys_type(struct UndoType *ut); /* editmesh_select.c */ -void EDBM_select_mirrored( - struct BMEditMesh *em, const int axis, const bool extend, int *r_totmirr, int *r_totfail); +void EDBM_select_mirrored(struct BMEditMesh *em, + const struct Mesh *me, + const int axis, + const bool extend, + int *r_totmirr, + int *r_totfail); struct BMVert *EDBM_vert_find_nearest_ex(struct ViewContext *vc, float *r_dist, diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 40d57af97aa..ebd8d50cfc3 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -75,15 +75,18 @@ /** \name Select Mirror * \{ */ -void EDBM_select_mirrored( - BMEditMesh *em, const int axis, const bool extend, int *r_totmirr, int *r_totfail) +void EDBM_select_mirrored(BMEditMesh *em, + const Mesh *me, + const int axis, + const bool extend, + int *r_totmirr, + int *r_totfail) { - Mesh *me = (Mesh *)em->ob->data; BMesh *bm = em->bm; BMIter iter; int totmirr = 0; int totfail = 0; - bool use_topology = (me && (me->editflag & ME_EDIT_MIRROR_TOPO)); + bool use_topology = me->editflag & ME_EDIT_MIRROR_TOPO; *r_totmirr = *r_totfail = 0; @@ -3863,7 +3866,7 @@ static int edbm_select_mirror_exec(bContext *C, wmOperator *op) for (int axis = 0; axis < 3; axis++) { if ((1 << axis) & axis_flag) { - EDBM_select_mirrored(em, axis, extend, &tot_mirr_iter, &tot_fail_iter); + EDBM_select_mirrored(em, obedit->data, axis, extend, &tot_mirr_iter, &tot_fail_iter); } } |