diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 02:15:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 12:48:16 +0300 |
commit | a25a7714c592dff1fc1b3b4b0888bf984fa9e6fd (patch) | |
tree | 31335c1e02de10d3c97f9fdbe98b71ebc410e451 /source/blender/modifiers/intern/MOD_bevel.c | |
parent | 6cc09d006af4a89cea14485e8e3896bd38a80e4b (diff) |
Cleanup: style, use braces for modifiers
Diffstat (limited to 'source/blender/modifiers/intern/MOD_bevel.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_bevel.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 32a020a35ff..02d3bd305be 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -124,24 +124,28 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes .pmask = CD_MASK_ORIGINDEX}, }); - if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) + if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) { MOD_get_vgroup(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup); + } if (vertex_only) { BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { - if (!BM_vert_is_manifold(v)) + if (!BM_vert_is_manifold(v)) { continue; + } if (bmd->lim_flags & MOD_BEVEL_WEIGHT) { weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT); - if (weight == 0.0f) + 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" */ - if (weight < 0.5f) + if (weight < 0.5f) { continue; + } } BM_elem_flag_enable(v, BM_ELEM_TAG); } @@ -165,14 +169,16 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes if (BM_edge_is_manifold(e)) { if (bmd->lim_flags & MOD_BEVEL_WEIGHT) { weight = BM_elem_float_data_get(&bm->edata, e, CD_BWEIGHT); - if (weight == 0.0f) + if (weight == 0.0f) { continue; + } } else if (vgroup != -1) { weight = defvert_array_find_weight_safe(dvert, BM_elem_index_get(e->v1), vgroup); weight2 = defvert_array_find_weight_safe(dvert, BM_elem_index_get(e->v2), vgroup); - if (weight < 0.5f || weight2 < 0.5f) + if (weight < 0.5f || weight2 < 0.5f) { continue; + } } BM_elem_flag_enable(e, BM_ELEM_TAG); BM_elem_flag_enable(e->v1, BM_ELEM_TAG); |