diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:24:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:24:53 +0400 |
commit | 5a90ea77bc1333efe4e1e54984a080550ed3f707 (patch) | |
tree | 8ba5f94ddcd2c57440197a910305daae5e913554 /source/blender/modifiers/intern/MOD_decimate.c | |
parent | 69e6894b15271884623ea6f56ead06db83acbe99 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/modifiers/intern/MOD_decimate.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_decimate.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index 3c3381dc36b..f55faf9c183 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -97,7 +97,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), if (mf->v4) numTris++; } - if(numTris<3) { + if (numTris<3) { modifier_setError(md, "%s", TIP_("Modifier requires more than 3 input faces (triangles).")); dm = CDDM_copy(dm); return dm; @@ -109,7 +109,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), lod.vertex_num= totvert; lod.face_num= numTris; - for(a=0; a<totvert; a++) { + for (a=0; a<totvert; a++) { MVert *mv = &mvert[a]; float *vbCo = &lod.vertex_buffer[a*3]; float *vbNo = &lod.vertex_normal_buffer[a*3]; @@ -119,14 +119,14 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), } numTris = 0; - for(a=0; a<totface; a++) { + for (a=0; a<totface; a++) { MFace *mf = &mface[a]; int *tri = &lod.triangle_index_buffer[3*numTris++]; tri[0]= mf->v1; tri[1]= mf->v2; tri[2]= mf->v3; - if(mf->v4) { + if (mf->v4) { tri = &lod.triangle_index_buffer[3*numTris++]; tri[0]= mf->v1; tri[1]= mf->v3; @@ -135,15 +135,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), } dmd->faceCount = 0; - if(LOD_LoadMesh(&lod) ) { - if( LOD_PreprocessMesh(&lod) ) { + if (LOD_LoadMesh(&lod) ) { + if ( LOD_PreprocessMesh(&lod) ) { /* we assume the decim_faces tells how much to reduce */ - while(lod.face_num > numTris*dmd->percent) { - if( LOD_CollapseEdge(&lod)==0) break; + while (lod.face_num > numTris*dmd->percent) { + if ( LOD_CollapseEdge(&lod)==0) break; } - if(lod.vertex_num>2) { + if (lod.vertex_num>2) { result = CDDM_new(lod.vertex_num, 0, lod.face_num, 0, 0); dmd->faceCount = lod.face_num; } @@ -151,16 +151,16 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), result = CDDM_new(lod.vertex_num, 0, 0, 0, 0); mvert = CDDM_get_verts(result); - for(a=0; a<lod.vertex_num; a++) { + for (a=0; a<lod.vertex_num; a++) { MVert *mv = &mvert[a]; float *vbCo = &lod.vertex_buffer[a*3]; copy_v3_v3(mv->co, vbCo); } - if(lod.vertex_num>2) { + if (lod.vertex_num>2) { mface = CDDM_get_tessfaces(result); - for(a=0; a<lod.face_num; a++) { + for (a=0; a<lod.face_num; a++) { MFace *mf = &mface[a]; int *tri = &lod.triangle_index_buffer[a*3]; mf->v1 = tri[0]; |