[Bf-blender-cvs] [9d7abce359f] master: BMesh: remove BMEditMesh.ob use for select mirror
Campbell Barton
noreply at git.blender.org
Tue Jan 7 07:50:34 CET 2020
Commit: 9d7abce359f60eefb78e5edaf21aa24322a6f511
Author: Campbell Barton
Date: Tue Jan 7 14:45:01 2020 +1100
Branches: master
https://developer.blender.org/rB9d7abce359f60eefb78e5edaf21aa24322a6f511
BMesh: remove BMEditMesh.ob use for select mirror
===================================================================
M source/blender/editors/include/ED_mesh.h
M source/blender/editors/mesh/editmesh_select.c
===================================================================
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);
}
}
More information about the Bf-blender-cvs
mailing list