diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2013-11-10 16:31:57 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2013-11-10 16:31:57 +0400 |
commit | bfb9cefccbf8ff9733e9739e9c4dbc93a762bebe (patch) | |
tree | b5cfac9f94eb2ac52586084a633f7658e17d5058 /source/blender/bmesh/operators | |
parent | 73c2253ac629665715ec700b049e97fe1b17bc56 (diff) |
Added options for how bevel amount is measured.
Now there is an 'Offset Type' dropdown on tool
shelf with types:
Offset - current method, offset of new edge
from old along sliding face
Width - width of new bevel face (if segments=1)
Depth - amount a chamfering plane moves down
from original edge
Percent - percent of way sliding edges move
along their adjacent edges
The different options mainly are useful when
beveling more than one edge at once.
Leaving as a TODO to put these in the modifier,
as doing that has more permanent effects so
want to let users shake out problems with this
first.
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_bevel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c index eef470e0d85..4eec15d4d7e 100644 --- a/source/blender/bmesh/operators/bmo_bevel.c +++ b/source/blender/bmesh/operators/bmo_bevel.c @@ -35,9 +35,10 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op) { - const float offset = BMO_slot_float_get(op->slots_in, "offset"); - const int seg = BMO_slot_int_get(op->slots_in, "segments"); - const bool vonly = BMO_slot_bool_get(op->slots_in, "vertex_only"); + const float offset = BMO_slot_float_get(op->slots_in, "offset"); + const int offset_type = BMO_slot_int_get(op->slots_in, "offset_type"); + const int seg = BMO_slot_int_get(op->slots_in, "segments"); + const bool vonly = BMO_slot_bool_get(op->slots_in, "vertex_only"); if (offset > 0) { BMOIter siter; @@ -58,7 +59,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op) } } - BM_mesh_bevel(bm, offset, seg, vonly, false, false, NULL, -1); + BM_mesh_bevel(bm, offset, offset_type, seg, vonly, false, false, NULL, -1); BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG); } |