diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-15 06:51:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-15 06:51:54 +0400 |
commit | 96d5e05e4809f0a7526d9c8f2fc179ff8b3a777c (patch) | |
tree | 4911c2eb58fcbab6df66eb325592bd8bc4886518 /source/blender/bmesh | |
parent | 8572ae89cdc9148fc948f0052e7f12135ba5c664 (diff) |
Mesh Inset: following existing edges is now optional
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 1 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_inset.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index b4697935da5..0c75597282e 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -1673,6 +1673,7 @@ static BMOpDefine bmo_inset_region_def = { {"use_even_offset", BMO_OP_SLOT_BOOL}, {"use_interpolate", BMO_OP_SLOT_BOOL}, {"use_relative_offset", BMO_OP_SLOT_BOOL}, + {"use_edge_rail", BMO_OP_SLOT_BOOL}, {"thickness", BMO_OP_SLOT_FLT}, {"depth", BMO_OP_SLOT_FLT}, {"use_outset", BMO_OP_SLOT_BOOL}, diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index c79480d47dd..a255c534736 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -390,6 +390,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset"); const bool use_even_boundry = use_even_offset; /* could make own option */ const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset"); + const bool use_edge_rail = BMO_slot_bool_get(op->slots_in, "use_edge_rail"); const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate"); const float thickness = BMO_slot_float_get(op->slots_in, "thickness"); const float depth = BMO_slot_float_get(op->slots_in, "depth"); @@ -616,7 +617,10 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) * cross product between both face normals */ add_v3_v3v3(tvec, e_info_a->no, e_info_b->no); - if (f_a != f_b) { + if (use_edge_rail == false) { + /* pass */ + } + else if (f_a != f_b) { /* these lookups are very quick */ BMLoop *l_other_a = BM_loop_other_vert_loop(e_info_a->l, v_split); BMLoop *l_other_b = BM_loop_other_vert_loop(e_info_b->l, v_split); |