From a25a7714c592dff1fc1b3b4b0888bf984fa9e6fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 09:15:10 +1000 Subject: Cleanup: style, use braces for modifiers --- source/blender/modifiers/intern/MOD_bevel.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_bevel.c') 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); -- cgit v1.2.3