diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_marking.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 0c18625924d..53d9b4b1b56 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -60,7 +60,9 @@ static void recount_totsels(BMesh *bm) int count = 0; BM_ITER_MESH (ele, &iter, bm, iter_types[i]) { - if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) count += 1; + if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) { + count += 1; + } } *tots[i] = count; } @@ -667,20 +669,32 @@ static int bm_mesh_flag_count( if (htype & BM_VERT) { BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) { - if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) tot++; + if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) { + continue; + } + if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) { + tot++; + } } } if (htype & BM_EDGE) { BM_ITER_MESH (ele, &iter, bm, BM_EDGES_OF_MESH) { - if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) tot++; + if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) { + continue; + } + if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) { + tot++; + } } } if (htype & BM_FACE) { BM_ITER_MESH (ele, &iter, bm, BM_FACES_OF_MESH) { - if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) tot++; + if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) { + continue; + } + if (BM_elem_flag_test_bool(ele, hflag) == test_for_enabled) { + tot++; + } } } @@ -876,9 +890,9 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]) * we cant make a crossvec from a vec thats the same as the vec * unlikely but possible, so make sure if the normal is (0, 0, 1) * that vec isn't the same or in the same direction even. */ - if (eve->no[0] < 0.5f) vec[0] = 1.0f; - else if (eve->no[1] < 0.5f) vec[1] = 1.0f; - else vec[2] = 1.0f; + if (eve->no[0] < 0.5f) { vec[0] = 1.0f; } + else if (eve->no[1] < 0.5f) { vec[1] = 1.0f; } + else { vec[2] = 1.0f; } cross_v3_v3v3(r_plane, eve->no, vec); } normalize_v3(r_plane); @@ -1371,15 +1385,21 @@ void _bm_elem_hide_set(BMesh *bm, BMHeader *head, const bool hide) * hiding an element */ switch (head->htype) { case BM_VERT: - if (hide) BM_vert_select_set(bm, (BMVert *)head, false); + if (hide) { + BM_vert_select_set(bm, (BMVert *)head, false); + } BM_vert_hide_set((BMVert *)head, hide); break; case BM_EDGE: - if (hide) BM_edge_select_set(bm, (BMEdge *)head, false); + if (hide) { + BM_edge_select_set(bm, (BMEdge *)head, false); + } BM_edge_hide_set((BMEdge *)head, hide); break; case BM_FACE: - if (hide) BM_face_select_set(bm, (BMFace *)head, false); + if (hide) { + BM_face_select_set(bm, (BMFace *)head, false); + } BM_face_hide_set((BMFace *)head, hide); break; default: |