diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 19:14:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 19:14:16 +0400 |
commit | ef054e165cad35715a5b2388aac3db68a65ea275 (patch) | |
tree | 0726e9c5a28962839a8d36ba4647f0b76fff7ad2 /source/blender/blenkernel | |
parent | 887d1533f81b0ee89975efd8162a011b99c976af (diff) |
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 22 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifiers_bmesh.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 10 |
8 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 511b4603791..0fd030be39c 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1223,7 +1223,7 @@ void DM_update_weight_mcol(Object *ob, DerivedMesh *dm, int const draw_flag, for (i=0; i<dm->numPolyData; i++, mp++) { ml = mloop + mp->loopstart; - BLI_array_growitems(wtcol_l, mp->totloop); + BLI_array_grow_items(wtcol_l, mp->totloop); for (j = 0; j < mp->totloop; j++, ml++, totloop++) { copy_v4_v4_char((char *)&wtcol_l[totloop], (char *)&wtcol_v[4 * ml->v]); diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 857f6e75e2c..263f89a363e 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -162,7 +162,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm) /* no need to ensure the loop order, we know its ok */ else if (f->len == 3) { - BLI_array_growone(looptris); + BLI_array_grow_one(looptris); l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f); for (j=0; l; l=BM_iter_step(&liter), j++) { looptris[i][j] = l; @@ -171,7 +171,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm) } else if (f->len == 4) { BMLoop *ltmp[4]; - BLI_array_growitems(looptris, 2); + BLI_array_grow_items(looptris, 2); l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f); for (j=0; l; l=BM_iter_step(&liter), j++) { @@ -219,7 +219,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm) BLI_addfilledge(&sf_ctx, firstv, v); totfilltri = BLI_edgefill_ex(&sf_ctx, FALSE, f->no); - BLI_array_growitems(looptris, totfilltri); + BLI_array_grow_items(looptris, totfilltri); for (efa = sf_ctx.fillfacebase.first; efa; efa=efa->next) { BMLoop *l1= efa->v1->tmp.p; diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 2fd1d291363..c33bb973385 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1906,7 +1906,7 @@ void do_versions_ipos_to_animato(Main *main) AnimData *adt= BKE_id_add_animdata(id); - SEQ_BEGIN(ed, seq) { + SEQ_BEGIN (ed, seq) { IpoCurve *icu = (seq->ipo) ? seq->ipo->curve.first : NULL; short adrcode = SEQ_FAC1; diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 7509260d503..14ccd401a30 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1875,8 +1875,8 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys, BLI_array_empty(vertcos); BLI_array_empty(vertnos); - BLI_array_growitems(vertcos, mp->totloop); - BLI_array_growitems(vertnos, mp->totloop); + BLI_array_grow_items(vertcos, mp->totloop); + BLI_array_grow_items(vertnos, mp->totloop); for (j=0; j < mp->totloop; j++) { int vindex = ml[j].v; @@ -1885,7 +1885,7 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpolys, } BLI_array_empty(edgevecbuf); - BLI_array_growitems(edgevecbuf, mp->totloop); + BLI_array_grow_items(edgevecbuf, mp->totloop); accumulate_vertex_normals_poly(vertnos, pnors[i], vertcos, edgevecbuf, mp->totloop); } @@ -2422,8 +2422,8 @@ int mesh_recalcTessellation(CustomData *fdata, #ifdef USE_TESSFACE_SPEEDUP #define ML_TO_MF(i1, i2, i3) \ - BLI_array_growone(mface_to_poly_map); \ - BLI_array_growone(mface); \ + BLI_array_grow_one(mface_to_poly_map); \ + BLI_array_grow_one(mface); \ mface_to_poly_map[mface_index] = poly_index; \ mf= &mface[mface_index]; \ /* set loop indices, transformed to vert indices later */ \ @@ -2441,8 +2441,8 @@ int mesh_recalcTessellation(CustomData *fdata, /* ALMOST IDENTICAL TO DEFINE ABOVE (see EXCEPTION) */ #define ML_TO_MF_QUAD() \ - BLI_array_growone(mface_to_poly_map); \ - BLI_array_growone(mface); \ + BLI_array_grow_one(mface_to_poly_map); \ + BLI_array_grow_one(mface); \ mface_to_poly_map[mface_index] = poly_index; \ mf= &mface[mface_index]; \ /* set loop indices, transformed to vert indices later */ \ @@ -2500,10 +2500,10 @@ int mesh_recalcTessellation(CustomData *fdata, totfilltri = BLI_edgefill(&sf_ctx, FALSE); if (totfilltri) { - BLI_array_growitems(mface_to_poly_map, totfilltri); - BLI_array_growitems(mface, totfilltri); + BLI_array_grow_items(mface_to_poly_map, totfilltri); + BLI_array_grow_items(mface, totfilltri); if (poly_orig_index) { - BLI_array_growitems(mface_orig_index, totfilltri); + BLI_array_grow_items(mface_orig_index, totfilltri); } for (f = sf_ctx.fillfacebase.first; f; f = f->next, mf++) { @@ -2672,7 +2672,7 @@ int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata, k = 0; for (i = 0; i<totpoly; i++, mp++) { if (ELEM(mp->totloop, 3, 4)) { - BLI_array_growone(mface); + BLI_array_grow_one(mface); mf = &mface[k]; mf->mat_nr = mp->mat_nr; diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c index 573b8a725b3..99bb3468320 100644 --- a/source/blender/blenkernel/intern/modifiers_bmesh.c +++ b/source/blender/blenkernel/intern/modifiers_bmesh.c @@ -117,8 +117,8 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm) BLI_array_empty(verts); BLI_array_empty(edges); - BLI_array_growitems(verts, mp->totloop); - BLI_array_growitems(edges, mp->totloop); + BLI_array_grow_items(verts, mp->totloop); + BLI_array_grow_items(edges, mp->totloop); ml = mloop + mp->loopstart; for (j = 0; j < mp->totloop; j++, ml++) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6d3cce6ccfc..6b44ba976d5 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -625,10 +625,11 @@ void unlink_object(Object *ob) #endif if (sce->ed) { Sequence *seq; - SEQ_BEGIN(sce->ed, seq) - if (seq->scene_camera==ob) { - seq->scene_camera= NULL; + SEQ_BEGIN (sce->ed, seq) { + if (seq->scene_camera == ob) { + seq->scene_camera = NULL; } + } SEQ_END } } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 470e1a1c529..9291cb90dff 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -259,8 +259,7 @@ void seq_free_editing(Scene *scene) if (ed == NULL) return; - SEQ_BEGIN(ed, seq) - { + SEQ_BEGIN (ed, seq) { seq_free_sequence(scene, seq); } SEQ_END @@ -363,7 +362,7 @@ unsigned int seq_hash_render_data(const SeqRenderData *a) /* ************************* iterator ************************** */ /* *************** (replaces old WHILE_SEQ) ********************* */ -/* **************** use now SEQ_BEGIN() SEQ_END ***************** */ +/* **************** use now SEQ_BEGIN () SEQ_END ***************** */ /* sequence strip iterator: * - builds a full array, recursively into meta strips */ diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 83225163ea3..129d3a3f698 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -314,7 +314,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, MLoop *ml = mloop + mp->loopstart; BLI_array_empty(fverts); - BLI_array_growitems(fverts, nverts); + BLI_array_grow_items(fverts, nverts); get_face_uv_map_vert(vmap, mpoly, ml, i, fverts); @@ -350,7 +350,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, CCGFace *f; BLI_array_empty(fverts); - BLI_array_growitems(fverts, nverts); + BLI_array_grow_items(fverts, nverts); get_face_uv_map_vert(vmap, mpoly, ml, i, fverts); ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), nverts, fverts, &f); @@ -583,7 +583,7 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm, CCGFace *f; BLI_array_empty(fVerts); - BLI_array_growitems(fVerts, mp->totloop); + BLI_array_grow_items(fVerts, mp->totloop); ml = mloop + mp->loopstart; for (j = 0; j < mp->totloop; j++, ml++) { @@ -3150,13 +3150,13 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss, *((int *)ccgSubSurf_getFaceUserData(ss, f)) = vertNum; BLI_array_empty(loopidx); - BLI_array_growitems(loopidx, numVerts); + BLI_array_grow_items(loopidx, numVerts); for (s = 0; s < numVerts; s++) { loopidx[s] = loopindex++; } BLI_array_empty(vertidx); - BLI_array_growitems(vertidx, numVerts); + BLI_array_grow_items(vertidx, numVerts); for (s = 0; s < numVerts; s++) { CCGVert *v = ccgSubSurf_getFaceVert(f, s); vertidx[s] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v)); |