diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-13 05:00:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-13 05:00:07 +0400 |
commit | 49411a6e37ce88e644db733621ac2577851a7b7e (patch) | |
tree | 1c8b40d96f40d1e991694ce227d6e7572b620422 /source/blender/editors/mesh/editmesh_rip.c | |
parent | fd14c344e0b1160ab17243297a86521d73256b8b (diff) |
fix own regression, rip tool wasn't handling selection.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_rip.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 1128d705e47..253aef7d5fe 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -50,6 +50,8 @@ #include "ED_transform.h" #include "ED_view3d.h" +#include "tools/bmesh_edgesplit.h" + #include "mesh_intern.h" /* own include */ /** @@ -510,24 +512,6 @@ static void edbm_tagged_loop_pairs_do_fill_faces(BMesh *bm, UnorderedLoopPair *u /* --- end 'face-fill' code --- */ - -static bool edbm_rip_call_edgesplit(BMEditMesh *em, wmOperator *op) -{ - BMOperator bmop; - - if (!EDBM_op_init(em, &bmop, op, "split_edges edges=%he verts=%hv use_verts=%b", - BM_ELEM_TAG, BM_ELEM_SELECT, true)) - { - return false; - } - BMO_op_exec(em->bm, &bmop); - if (!EDBM_op_finish(em, &bmop, op, true)) { - return false; - } - - return true; -} - /** * This is the main vert ripping function (rip when one vertex is selected) */ @@ -648,7 +632,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve BM_vert_select_set(bm, v, false); - bmesh_vert_separate(bm, v, &vout, &vout_len); + bmesh_vert_separate(bm, v, &vout, &vout_len, true); if (vout_len < 2) { MEM_freeN(vout); @@ -784,10 +768,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve fill_uloop_pairs = edbm_tagged_loop_pairs_to_fill(bm); } - if (!edbm_rip_call_edgesplit(em, op)) { - if (fill_uloop_pairs) MEM_freeN(fill_uloop_pairs); - return OPERATOR_CANCELLED; - } + BM_mesh_edgesplit(em->bm, true, true, true); } dist = FLT_MAX; @@ -949,10 +930,7 @@ static int edbm_rip_invoke__edge(bContext *C, wmOperator *op, const wmEvent *eve fill_uloop_pairs = edbm_tagged_loop_pairs_to_fill(bm); } - if (!edbm_rip_call_edgesplit(em, op)) { - if (fill_uloop_pairs) MEM_freeN(fill_uloop_pairs); - return OPERATOR_CANCELLED; - } + BM_mesh_edgesplit(em->bm, true, true, true); /* note: the output of the bmesh operator is ignored, since we built * the contiguous loop pairs to split already, its possible that some |