diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2015-07-05 16:53:17 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2015-07-05 16:53:17 +0300 |
commit | 12aff8d783b6d9e9507dbd8747d8e343c2c526ec (patch) | |
tree | 736dfb7db9d72489ac7ce515e8dea7a3059bc25c /source/blender/modifiers | |
parent | 51e9a814c9f4d27ab4d67b3a9df9b23f44c92b3d (diff) |
Add 'loop slide' option to bevel. See T45260
Current behavior of bevel is to 'loop slide' along unbeveled edges
when possible, but this produces uneven bevel widths sometimes,
so this option lets user choose between having the loop slide effect
or having more even bevel widths. Trying it out with default being
'no loop slide', so different from current behavior. May reverse this
choice later, depending on user reactions.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_bevel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index c2b5a29939f..63e4b15d52e 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -112,6 +112,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob, const bool do_clamp = !(bmd->flags & MOD_BEVEL_OVERLAP_OK); const int offset_type = bmd->val_flags; const int mat = CLAMPIS(bmd->mat, -1, ob->totcol - 1); + const bool loop_slide = (bmd->flags & MOD_BEVEL_LOOP_SLIDE) != 0; bm = DM_to_bmesh(dm, true); if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) @@ -173,7 +174,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob, BM_mesh_bevel(bm, bmd->value, offset_type, bmd->res, bmd->profile, vertex_only, bmd->lim_flags & MOD_BEVEL_WEIGHT, do_clamp, - dvert, vgroup, mat); + dvert, vgroup, mat, loop_slide); result = CDDM_from_bmesh(bm, true); |