diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-06 22:34:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-06 22:34:07 +0300 |
commit | 4a5933bb74c4658c5ae35bafa4f0f6145a0430a5 (patch) | |
tree | 22612fa53c2548ddde5b0dfb5aacb164e33dcdfe /source | |
parent | 4d7b0e4fe35732687fb01625ede63f8a1b762d37 (diff) |
Rip tool, support filling-edges with fill enabled
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 44c0f83cb9f..c7a7828f3b2 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -607,6 +607,11 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve if (ese.ele) { BM_select_history_store(bm, v_new); } + + if (do_fill) { + BM_edge_create(bm, v, v_new, NULL, BM_CREATE_NOP); + } + return OPERATOR_FINISHED; } @@ -719,6 +724,15 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve } } + /* vout[0] == best + * vout[1] == glue + * vout[2+] == splice with glue (when vout_len > 2) + */ + if (vi_best != 0) { + SWAP(BMVert *, vout[0], vout[vi_best]); + vi_best = 0; + } + /* select the vert from the best region */ v = vout[vi_best]; BM_vert_select_set(bm, v, true); @@ -729,21 +743,18 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve /* splice all others back together */ if (vout_len > 2) { - - /* vout[0] == best - * vout[1] == glue - * vout[2+] == splice with glue - */ - if (vi_best != 0) { - SWAP(BMVert *, vout[0], vout[vi_best]); - vi_best = 0; - } - for (i = 2; i < vout_len; i++) { BM_vert_splice(bm, vout[1], vout[i]); } } + if (do_fill) { + if (do_fill) { + /* match extrude vert-order */ + BM_edge_create(bm, vout[1], vout[0], NULL, BM_CREATE_NOP); + } + } + MEM_freeN(vout); return OPERATOR_FINISHED; |