diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-18 13:33:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-18 13:33:11 +0400 |
commit | fd9dac77d1d6de6ae6eea3ccc19099decfae665f (patch) | |
tree | 2c41ac308818992b27692f91359caf53bfb000b5 /source/blender/bmesh/operators/bmo_bevel.c | |
parent | b72c1ac33cd03553e4529b39215ed7e168920ad5 (diff) |
bevel now only takes manifold edges (so it doesnt need to check for them)
Diffstat (limited to 'source/blender/bmesh/operators/bmo_bevel.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_bevel.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c index 9de15fb9c9c..049b923315b 100644 --- a/source/blender/bmesh/operators/bmo_bevel.c +++ b/source/blender/bmesh/operators/bmo_bevel.c @@ -32,20 +32,27 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op) { - BMOIter siter; - BMVert *v; - const float offset = BMO_slot_float_get(op, "offset"); const int seg = BMO_slot_int_get(op, "segments"); if (offset > 0) { + BMOIter siter; + BMEdge *e; + BMVert *v; + /* first flush 'geom' into flags, this makes it possible to check connected data */ BM_mesh_elem_hflag_disable_all(bm, BM_VERT | BM_EDGE, BM_ELEM_TAG, FALSE); - BMO_ITER (v, &siter, bm, op, "geom", BM_VERT | BM_EDGE) { + BMO_ITER (v, &siter, bm, op, "geom", BM_VERT) { BM_elem_flag_enable(v, BM_ELEM_TAG); } + BMO_ITER (e, &siter, bm, op, "geom", BM_EDGE) { + if (BM_edge_is_manifold(e)) { + BM_elem_flag_enable(e, BM_ELEM_TAG); + } + } + BM_mesh_bevel(bm, offset, seg); } } |