diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-14 23:28:20 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-15 10:57:11 +0400 |
commit | 8d1d16bf0ddd79d7bb42eac03143dccbf3e61d05 (patch) | |
tree | 76a51eef915ebdedf309194ba645f6057a131a95 /source/blender/modifiers/intern/MOD_bevel.c | |
parent | d0320947d3be73c1b0ce1591e170abe9d4e38793 (diff) |
Bevel modifier: Add weight support for vertices bevelling.
Nothing to say here, really, just a couple of lines to add to get it working...
Diffstat (limited to 'source/blender/modifiers/intern/MOD_bevel.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_bevel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 2de3220e683..1dca18dce37 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -121,7 +121,12 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob, BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { if (!BM_vert_is_manifold(v)) continue; - if (vgroup != -1) { + if (bmd->lim_flags & MOD_BEVEL_WEIGHT) { + weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT); + if (weight == 0.0f) + continue; + } + else if (vgroup != -1) { weight = defvert_array_find_weight_safe(dvert, BM_elem_index_get(v), vgroup); /* Check is against 0.5 rather than != 0.0 because cascaded bevel modifiers will * interpolate weights for newly created vertices, and may cause unexpected "selection" */ |