Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Rathi <rohanrathi08@gmail.com>2018-08-05 06:09:20 +0300
committerRohan Rathi <rohanrathi08@gmail.com>2018-08-05 06:09:20 +0300
commitc41ce58fdeba46dd96dccd7d2b98b1d3f5de726e (patch)
tree89279e675d429e3f78fcd25164fc3f5b911d9418 /source/blender/bmesh
parent710d2def6509d2c993cb96f42eb1a97ccc60bfcf (diff)
Fix indentation, spacing and added comments
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c15
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c3
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c15
3 files changed, 21 insertions, 12 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 4059cf27f23..292453fac4b 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -1114,9 +1114,10 @@ void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all)
/* Note that we only handle unselected neighbor vertices here, main loop will take care of
* selected ones. */
- if (!BM_elem_flag_test(l->prev->v, BM_ELEM_SELECT) &&
+ if ((!BM_elem_flag_test(l->prev->v, BM_ELEM_SELECT)) &&
!BLI_BITMAP_TEST(done_verts, BM_elem_index_get(l->prev->v)))
{
+
BMLoop *l_prev;
BMIter liter_prev;
BM_ITER_ELEM(l_prev, &liter_prev, l->prev->v, BM_LOOPS_OF_VERT) {
@@ -1125,9 +1126,10 @@ void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all)
BLI_BITMAP_ENABLE(done_verts, BM_elem_index_get(l_prev->v));
}
- if (!BM_elem_flag_test(l->next->v, BM_ELEM_SELECT) &&
+ if ((!BM_elem_flag_test(l->next->v, BM_ELEM_SELECT)) &&
!BLI_BITMAP_TEST(done_verts, BM_elem_index_get(l->next->v)))
{
+
BMLoop *l_next;
BMIter liter_next;
BM_ITER_ELEM(l_next, &liter_next, l->next->v, BM_LOOPS_OF_VERT) {
@@ -1172,7 +1174,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor)
short(*clnor)[2] = BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset);
int l_index = BM_elem_index_get(l);
- BKE_lnor_space_custom_data_to_normal(bm->lnor_spacearr->lspacearr[l_index], *clnor, oldnors[l_index]);
+ BKE_lnor_space_custom_data_to_normal(bm->lnor_spacearr->lspacearr[l_index], *clnor,
+ oldnors[l_index]);
}
}
}
@@ -1191,7 +1194,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor)
if (preserve_clnor) {
short(*clnor)[2] = BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset);
int l_index = BM_elem_index_get(l);
- BKE_lnor_space_custom_normal_to_data(bm->lnor_spacearr->lspacearr[l_index], oldnors[l_index], *clnor);
+ BKE_lnor_space_custom_normal_to_data(bm->lnor_spacearr->lspacearr[l_index], oldnors[l_index],
+ *clnor);
}
BM_ELEM_API_FLAG_DISABLE(l, BM_LNORSPACE_UPDATE);
}
@@ -1398,7 +1402,8 @@ BMLoopNorEditDataArray *BM_loop_normal_editdata_array_init(BMesh *bm)
BLI_assert(bm->spacearr_dirty == 0);
BMLoopNorEditDataArray *lnors_ed_arr = MEM_mallocN(sizeof(*lnors_ed_arr), __func__);
- lnors_ed_arr->lidx_to_lnor_editdata = MEM_callocN(sizeof(*lnors_ed_arr->lidx_to_lnor_editdata) * bm->totloop, __func__);
+ lnors_ed_arr->lidx_to_lnor_editdata = MEM_callocN(sizeof(*lnors_ed_arr->lidx_to_lnor_editdata) * bm->totloop,
+ __func__);
if (!CustomData_has_layer(&bm->ldata, CD_CUSTOMLOOPNORMAL)) {
BM_data_layer_add(bm, &bm->ldata, CD_CUSTOMLOOPNORMAL);
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index 9d956c26390..eb299dbba60 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -66,7 +66,8 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
}
}
- BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, clamp_overlap, NULL, -1, material, loop_slide, mark_seam, mark_sharp, hnmode, op);
+ BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, clamp_overlap, NULL, -1, material,
+ loop_slide, mark_seam, mark_sharp, hnmode, op);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "edges.out", BM_EDGE, BM_ELEM_TAG);
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 79310deef2a..b45c9e295ab 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -1554,16 +1554,19 @@ static void check_edge_data_seam_sharp_edges(BevVert *bv, int flag, bool neg)
int flag_count = 0;
EdgeHalf *ne = e->next;
- while ((!neg && !BEV_EXTEND_EDGE_DATA_CHECK(ne, flag) || (neg && BEV_EXTEND_EDGE_DATA_CHECK(ne, flag))) && ne != efirst) {
+ while ((!neg && !BEV_EXTEND_EDGE_DATA_CHECK(ne, flag) || (neg && BEV_EXTEND_EDGE_DATA_CHECK(ne, flag))) &&
+ ne != efirst)
+ {
if (ne->is_bev)
flag_count++;
ne = ne->next;
}
if (ne == e || (ne == efirst && (!neg && !BEV_EXTEND_EDGE_DATA_CHECK(efirst, flag) ||
- (neg && BEV_EXTEND_EDGE_DATA_CHECK(efirst, flag))))) {
+ (neg && BEV_EXTEND_EDGE_DATA_CHECK(efirst, flag)))))
+ {
break;
}
- if (flag == BM_ELEM_SEAM) /* Set seam_len / sharp_len of starting edge */
+ if (flag == BM_ELEM_SEAM) /* Set seam_len / sharp_len of starting edge */
e->rightv->seam_len = flag_count;
else if (flag == BM_ELEM_SMOOTH)
e->rightv->sharp_len = flag_count;
@@ -1687,7 +1690,7 @@ static void bevel_harden_normals_mode(BMesh *bm, BevelParams *bp, BevVert *bv, B
BMFace *f_a, *f_b;
BM_edge_face_pair(e, &f_a, &f_b);
- if(f_a && !BLI_ghash_haskey(tempfaceHash, SET_UINT_IN_POINTER(BM_elem_index_get(f_a)))) {
+ if (f_a && !BLI_ghash_haskey(tempfaceHash, SET_UINT_IN_POINTER(BM_elem_index_get(f_a)))) {
int f_area = BM_face_calc_area(f_a);
float f_no[3];
copy_v3_v3(f_no, f_a->no);
@@ -1695,7 +1698,7 @@ static void bevel_harden_normals_mode(BMesh *bm, BevelParams *bp, BevVert *bv, B
add_v3_v3(n_final, f_no);
BLI_ghash_insert(tempfaceHash, SET_UINT_IN_POINTER(BM_elem_index_get(f_a)), NULL);
}
- if(f_b && !BLI_ghash_haskey(tempfaceHash, SET_UINT_IN_POINTER(BM_elem_index_get(f_b)))) {
+ if (f_b && !BLI_ghash_haskey(tempfaceHash, SET_UINT_IN_POINTER(BM_elem_index_get(f_b)))) {
int f_area = BM_face_calc_area(f_b);
float f_no[3];
copy_v3_v3(f_no, f_b->no);
@@ -3794,7 +3797,7 @@ static void bevel_build_rings(BevelParams *bp, BMesh *bm, BevVert *bv)
NULL, bme1, bme2, bme3, mat_nr);
}
}
- if(do_fix_shading_bv)
+ if (do_fix_shading_bv)
BLI_ghash_insert(bp->faceHash, r_f, NULL);
}
}