diff options
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_automerge.c | 11 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 7 |
2 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/mesh/editmesh_automerge.c b/source/blender/editors/mesh/editmesh_automerge.c index 62f4fc6bb7d..82f53aafad8 100644 --- a/source/blender/editors/mesh/editmesh_automerge.c +++ b/source/blender/editors/mesh/editmesh_automerge.c @@ -54,7 +54,7 @@ * Used after transform operations. * \{ */ -void EDBM_automerge(Scene *scene, Object *obedit, bool update, const char hflag) +void EDBM_automerge(Object *obedit, bool update, const char hflag, const float dist) { BMEditMesh *em = BKE_editmesh_from_object(obedit); BMesh *bm = em->bm; @@ -69,7 +69,7 @@ void EDBM_automerge(Scene *scene, Object *obedit, bool update, const char hflag) BMO_FLAG_DEFAULTS, "find_doubles verts=%av keep_verts=%Hv dist=%f", hflag, - scene->toolsettings->doublimit); + dist); BMO_op_exec(bm, &findop); @@ -286,18 +286,17 @@ static int edbm_automerge_and_split_sort_cmp_by_keys_cb(const void *index1_v, } } -void EDBM_automerge_and_split(Scene *scene, - Object *obedit, +void EDBM_automerge_and_split(Object *obedit, bool split_edges, bool split_faces, bool update, - const char hflag) + const char hflag, + const float dist) { bool ok = false; BMEditMesh *em = BKE_editmesh_from_object(obedit); BMesh *bm = em->bm; - float dist = scene->toolsettings->doublimit; BMOperator findop, weldop; BMOpSlot *slot_targetmap; BMIter iter; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index b88b6cbb3a6..e5023068100 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3131,12 +3131,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) BM_mesh_elem_hflag_enable_test(em->bm, htype_select, BM_ELEM_TAG, true, true, BM_ELEM_SELECT); if (use_unselected) { - EDBM_op_init(em, &bmop, op, "automerge verts=%hv dist=%f", BM_ELEM_SELECT, threshold); - BMO_op_exec(em->bm, &bmop); - - if (!EDBM_op_finish(em, &bmop, op, true)) { - continue; - } + EDBM_automerge(obedit, false, BM_ELEM_SELECT, threshold); } else { EDBM_op_init(em, &bmop, op, "find_doubles verts=%hv dist=%f", BM_ELEM_SELECT, threshold); |