diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-17 16:05:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-17 16:05:07 +0400 |
commit | f79e1903072cfc9b2d9b3a6fca7056344c144b05 (patch) | |
tree | 3d1e0d73aafbdb56e286f8ab0b4d5fb42f600ac3 /source/blender/bmesh/operators/bmo_bridge.c | |
parent | 7b2172cb0b4afaada3f59f90f694847cfc61c43d (diff) |
fix for error in bridge tool, using freed faces from bmo input.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_bridge.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_bridge.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c index 4c3d6139a0c..b2387fb04f0 100644 --- a/source/blender/bmesh/operators/bmo_bridge.c +++ b/source/blender/bmesh/operators/bmo_bridge.c @@ -325,7 +325,17 @@ static void bridge_loop_pair(BMesh *bm, BMOperator op_sub; /* when we have to bridge betweeen different sized edge-loops, * be clever and post-process for best results */ - BM_mesh_triangulate(bm, true, true, NULL, NULL); + + + /* triangulate inline */ + BMO_op_initf(bm, &op_sub, 0, + "triangulate faces=%hf", + BM_ELEM_TAG, true); + BMO_op_exec(bm, &op_sub); + BMO_slot_buffer_flag_enable(bm, op_sub.slots_out, "faces.out", BM_FACE, FACE_OUT); + BMO_slot_buffer_hflag_enable(bm, op_sub.slots_out, "faces.out", BM_FACE, BM_ELEM_TAG, false); + BMO_op_finish(bm, &op_sub); + /* tag verts on each side so we can restrict rotation of edges to verts on the same side */ for (i = 0; i < 2; i++) { @@ -335,12 +345,12 @@ static void bridge_loop_pair(BMesh *bm, } } + BMO_op_initf(bm, &op_sub, 0, "beautify_fill faces=%hf edges=ae use_restrict_tag=%b", BM_ELEM_TAG, true); BMO_op_exec(bm, &op_sub); /* there may also be tagged faces that didnt rotate, mark input */ - BMO_slot_buffer_flag_enable(bm, op_sub.slots_in, "faces", BM_FACE, FACE_OUT); BMO_slot_buffer_flag_enable(bm, op_sub.slots_out, "geom.out", BM_FACE, FACE_OUT); BMO_op_finish(bm, &op_sub); } |