diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-10 10:26:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-10 10:29:24 +0300 |
commit | 7283179a002ee01bda843f31a4c5e294e0fcaa28 (patch) | |
tree | 5ea817e4c0bcd26982993be5b907e054e2319041 /source/blender | |
parent | 5b39b83af41ce7d93b39d39b0f1fea0f38090dde (diff) |
Poly Build: dissolve was using selection, not highlighted
Also no need to clear selection history,
BM_mesh_elem_hflag_disable_all handles this.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/mesh/editmesh_polybuild.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_polybuild.c b/source/blender/editors/mesh/editmesh_polybuild.c index 617242fa801..14ae6afc7cb 100644 --- a/source/blender/editors/mesh/editmesh_polybuild.c +++ b/source/blender/editors/mesh/editmesh_polybuild.c @@ -81,9 +81,6 @@ static void edbm_flag_disable_all_multi(ViewLayer *view_layer, const char hflag) BMesh *bm_iter = em_iter->bm; if (bm_iter->totvertsel) { EDBM_flag_disable_all(em_iter, hflag); - if (hflag & BM_ELEM_SELECT) { - BM_select_history_clear(em_iter->bm); - } DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE); } } @@ -429,8 +426,6 @@ static int edbm_polybuild_dissolve_at_cursor_invoke( BMEditMesh *em = vc.em; BMesh *bm = em->bm; - edbm_selectmode_ensure(vc.scene, vc.em, SCE_SELECT_VERTEX); - if (ele_act->head.htype == BM_EDGE) { BMEdge *e_act = (BMEdge *)ele_act; BMLoop *l_a, *l_b; @@ -450,9 +445,14 @@ static int edbm_polybuild_dissolve_at_cursor_invoke( } else { /* too involved to do inline */ + + /* Avoid using selection so failure wont leave modified state. */ + EDBM_flag_disable_all(em, BM_ELEM_TAG); + BM_elem_flag_enable(v_act, BM_ELEM_TAG); + if (!EDBM_op_callf(em, op, "dissolve_verts verts=%hv use_face_split=%b use_boundary_tear=%b", - BM_ELEM_SELECT, false, true)) + BM_ELEM_TAG, false, true)) { return OPERATOR_CANCELLED; } |