diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-06 01:51:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-06 01:53:51 +0300 |
commit | 86abddc96ad6d46ec1d64afd2435abbf5ab5e32e (patch) | |
tree | c5db9025302aeedafc15795e7c3208c3ac323886 | |
parent | 37ad451b8ee0d23dfe2a37897862231c3683fc0d (diff) |
Fix error bridging edge loops flipping
Calculating the winding failed when faces exist on both sides of the edge.
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index dc8e7bbb545..cd840494ad9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5125,6 +5125,17 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) "bridge_loops edges=%he use_pairs=%b use_cyclic=%b use_merge=%b merge_factor=%f twist_offset=%i", edge_hflag, use_pairs, use_cyclic, use_merge, merge_factor, twist_offset); + if (use_faces && totface_del) { + int i; + BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false); + for (i = 0; i < totface_del; i++) { + BM_elem_flag_enable(totface_del_arr[i], BM_ELEM_TAG); + } + BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS, + "delete geom=%hf context=%i", + BM_ELEM_TAG, DEL_FACES); + } + BMO_op_exec(em->bm, &bmop); if (!BMO_error_occurred(em->bm)) { @@ -5134,17 +5145,6 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, true); } - if (use_faces && totface_del) { - int i; - BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false); - for (i = 0; i < totface_del; i++) { - BM_elem_flag_enable(totface_del_arr[i], BM_ELEM_TAG); - } - BMO_op_callf(em->bm, BMO_FLAG_DEFAULTS, - "delete geom=%hf context=%i", - BM_ELEM_TAG, DEL_FACES); - } - if (use_merge == false) { struct EdgeRingOpSubdProps op_props; mesh_operator_edgering_props_get(op, &op_props); |