diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 20:14:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 20:14:04 +0400 |
commit | faeeb4b3aa07de24519ddc486c84f293a5378118 (patch) | |
tree | 6ba4188e44404f53c6484c5d3a71dae059a9de95 /source/blender/bmesh/operators | |
parent | 656213e6b2fb9adea9db8d7b08148301c0ffde76 (diff) |
individual inset was missing relative option.
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_inset.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 2324360291d..97444a50438 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -76,6 +76,7 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op) const float thickness = BMO_slot_float_get(op->slots_in, "thickness"); const float depth = BMO_slot_float_get(op->slots_in, "depth"); const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset"); + const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset"); const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate"); /* Only tag faces in slot */ @@ -146,6 +147,10 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op) } /* Modify vertices and their normals */ + if (use_relative_offset) { + mul_v3_fl(tvec, (BM_edge_calc_length(l_iter->e) + BM_edge_calc_length(l_iter->prev->e)) / 2.0f); + } + madd_v3_v3fl(v_new_co, tvec, thickness); /* Set normal, add depth and write new vertex position*/ |