diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 09:38:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:29 +0300 |
commit | 906ed54d286d0dd6686aac997883e7dfa4bba792 (patch) | |
tree | 85e5cdff6453d00473fd53559b4010ef2a0232b7 /source/blender/editors/mesh/editface.c | |
parent | e9c40b7339be915dfe4d6447d1995e54b762d27f (diff) |
Object Mode: ED_mesh_mirrtopo_* check edit-mode data
Replace object mode checks for edit-mode data
Diffstat (limited to 'source/blender/editors/mesh/editface.c')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 992d0fada5e..113173c1c03 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -635,8 +635,9 @@ static int mirrtopo_vert_sort(const void *v1, const void *v2) return 0; } -bool ED_mesh_mirrtopo_recalc_check(Mesh *me, DerivedMesh *dm, const int ob_mode, MirrTopoStore_t *mesh_topo_store) +bool ED_mesh_mirrtopo_recalc_check(Mesh *me, DerivedMesh *dm, MirrTopoStore_t *mesh_topo_store) { + const bool is_editmode = (me->edit_btmesh != NULL); int totvert; int totedge; @@ -654,7 +655,7 @@ bool ED_mesh_mirrtopo_recalc_check(Mesh *me, DerivedMesh *dm, const int ob_mode, } if ((mesh_topo_store->index_lookup == NULL) || - (mesh_topo_store->prev_ob_mode != ob_mode) || + (mesh_topo_store->prev_is_editmode != is_editmode) || (totvert != mesh_topo_store->prev_vert_tot) || (totedge != mesh_topo_store->prev_edge_tot)) { @@ -666,9 +667,11 @@ bool ED_mesh_mirrtopo_recalc_check(Mesh *me, DerivedMesh *dm, const int ob_mode, } -void ED_mesh_mirrtopo_init(Mesh *me, DerivedMesh *dm, const int ob_mode, MirrTopoStore_t *mesh_topo_store, - const bool skip_em_vert_array_init) +void ED_mesh_mirrtopo_init( + Mesh *me, DerivedMesh *dm, MirrTopoStore_t *mesh_topo_store, + const bool skip_em_vert_array_init) { + const bool is_editmode = (me->edit_btmesh != NULL); MEdge *medge = NULL, *med; BMEditMesh *em = dm ? NULL : me->edit_btmesh; @@ -691,7 +694,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, DerivedMesh *dm, const int ob_mode, MirrTop /* reallocate if needed */ ED_mesh_mirrtopo_free(mesh_topo_store); - mesh_topo_store->prev_ob_mode = ob_mode; + mesh_topo_store->prev_is_editmode = is_editmode; if (em) { BM_mesh_elem_index_ensure(em->bm, BM_VERT); |