Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-01-07 07:39:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-07 07:39:08 +0300
commit32b7056acd0a31e1d94fc3ed243d249baac04e92 (patch)
tree4d8b196b54d14a3e8020c75e7bc57c31956566dc /source/blender/editors/mesh/meshtools.c
parent9d7abce359f60eefb78e5edaf21aa24322a6f511 (diff)
BMesh: remove BMEditMesh.ob use for ED_mesh_mirror_* API
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r--source/blender/editors/mesh/meshtools.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 772e7446430..380d9100ed4 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -801,13 +801,30 @@ static MirrTopoStore_t mesh_topo_store = {NULL, -1. - 1, -1};
*/
int ED_mesh_mirror_topo_table(Object *ob, Mesh *me_eval, char mode)
{
+
+ Mesh *me_mirror = NULL;
+ BMEditMesh *em_mirror = NULL;
+
+ if (mode != 'e') {
+ Mesh *me = ob->data;
+ if (me_eval != NULL) {
+ me_mirror = me_eval;
+ }
+ else if (me->edit_mesh != NULL) {
+ em_mirror = me->edit_mesh;
+ }
+ else {
+ me_mirror = me;
+ }
+ }
+
if (mode == 'u') { /* use table */
- if (ED_mesh_mirrtopo_recalc_check(ob->data, me_eval, &mesh_topo_store)) {
+ if (ED_mesh_mirrtopo_recalc_check(em_mirror, me_mirror, &mesh_topo_store)) {
ED_mesh_mirror_topo_table(ob, me_eval, 's');
}
}
else if (mode == 's') { /* start table */
- ED_mesh_mirrtopo_init(ob->data, me_eval, &mesh_topo_store, false);
+ ED_mesh_mirrtopo_init(em_mirror, me_mirror, &mesh_topo_store, false);
}
else if (mode == 'e') { /* end table */
ED_mesh_mirrtopo_free(&mesh_topo_store);