[Bf-blender-cvs] [4a5933b] master: Rip tool, support filling-edges with fill enabled
Campbell Barton
noreply at git.blender.org
Wed May 6 21:50:53 CEST 2015
Commit: 4a5933bb74c4658c5ae35bafa4f0f6145a0430a5
Author: Campbell Barton
Date: Thu May 7 05:34:07 2015 +1000
Branches: master
https://developer.blender.org/rB4a5933bb74c4658c5ae35bafa4f0f6145a0430a5
Rip tool, support filling-edges with fill enabled
===================================================================
M source/blender/editors/mesh/editmesh_rip.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index 44c0f83..c7a7828 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;
More information about the Bf-blender-cvs
mailing list