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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-24 10:24:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:24:53 +0400
commit5a90ea77bc1333efe4e1e54984a080550ed3f707 (patch)
tree8ba5f94ddcd2c57440197a910305daae5e913554 /source/blender/modifiers/intern/MOD_cloth.c
parent69e6894b15271884623ea6f56ead06db83acbe99 (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_cloth.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index f23690454c0..d5d8439c749 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -61,7 +61,7 @@ static void initData(ModifierData *md)
clmd->point_cache = BKE_ptcache_add(&clmd->ptcaches);
/* check for alloc failing */
- if(!clmd->sim_parms || !clmd->coll_parms || !clmd->point_cache)
+ if (!clmd->sim_parms || !clmd->coll_parms || !clmd->point_cache)
return;
cloth_init (clmd);
@@ -78,12 +78,12 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
if (!clmd->sim_parms || !clmd->coll_parms) {
initData(md);
- if(!clmd->sim_parms || !clmd->coll_parms)
+ if (!clmd->sim_parms || !clmd->coll_parms)
return;
}
dm = get_dm(ob, NULL, derivedData, NULL, 0);
- if(dm == derivedData)
+ if (dm == derivedData)
dm = CDDM_copy(dm);
CDDM_apply_vert_coords(dm, vertexCos);
@@ -92,7 +92,7 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
clothModifier_do(clmd, md->scene, ob, dm, vertexCos);
- if(result) {
+ if (result) {
result->getVertCos(result, vertexCos);
result->release(result);
}
@@ -106,8 +106,8 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, Scene *scene, Ob
Base *base;
- if(clmd) {
- for(base = scene->base.first; base; base= base->next) {
+ if (clmd) {
+ for (base = scene->base.first; base; base= base->next) {
Object *ob1= base->object;
if (ob1 != ob) {
CollisionModifierData *coll_clmd = (CollisionModifierData *)modifiers_findByType(ob1, eModifierType_Collision);
@@ -125,10 +125,10 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
CustomDataMask dataMask = 0;
ClothModifierData *clmd = (ClothModifierData*)md;
- if(cloth_uses_vgroup(clmd))
+ if (cloth_uses_vgroup(clmd))
dataMask |= CD_MASK_MDEFORMVERT;
- if(clmd->sim_parms->shapekey_rest != 0)
+ if (clmd->sim_parms->shapekey_rest != 0)
dataMask |= CD_MASK_CLOTH_ORCO;
return dataMask;
@@ -139,20 +139,20 @@ static void copyData(ModifierData *md, ModifierData *target)
ClothModifierData *clmd = (ClothModifierData*) md;
ClothModifierData *tclmd = (ClothModifierData*) target;
- if(tclmd->sim_parms) {
- if(tclmd->sim_parms->effector_weights)
+ if (tclmd->sim_parms) {
+ if (tclmd->sim_parms->effector_weights)
MEM_freeN(tclmd->sim_parms->effector_weights);
MEM_freeN(tclmd->sim_parms);
}
- if(tclmd->coll_parms)
+ if (tclmd->coll_parms)
MEM_freeN(tclmd->coll_parms);
BKE_ptcache_free_list(&tclmd->ptcaches);
tclmd->point_cache = NULL;
tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms);
- if(clmd->sim_parms->effector_weights)
+ if (clmd->sim_parms->effector_weights)
tclmd->sim_parms->effector_weights = MEM_dupallocN(clmd->sim_parms->effector_weights);
tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms);
tclmd->point_cache = BKE_ptcache_copy_list(&tclmd->ptcaches, &clmd->ptcaches);
@@ -169,17 +169,17 @@ static void freeData(ModifierData *md)
ClothModifierData *clmd = (ClothModifierData*) md;
if (clmd) {
- if(G.rt > 0)
+ if (G.rt > 0)
printf("clothModifier_freeData\n");
cloth_free_modifier_extern (clmd);
- if(clmd->sim_parms) {
- if(clmd->sim_parms->effector_weights)
+ if (clmd->sim_parms) {
+ if (clmd->sim_parms->effector_weights)
MEM_freeN(clmd->sim_parms->effector_weights);
MEM_freeN(clmd->sim_parms);
}
- if(clmd->coll_parms)
+ if (clmd->coll_parms)
MEM_freeN(clmd->coll_parms);
BKE_ptcache_free_list(&clmd->ptcaches);
@@ -192,11 +192,11 @@ static void foreachIDLink(ModifierData *md, Object *ob,
{
ClothModifierData *clmd = (ClothModifierData*) md;
- if(clmd->coll_parms) {
+ if (clmd->coll_parms) {
walk(userData, ob, (ID **)&clmd->coll_parms->group);
}
- if(clmd->sim_parms && clmd->sim_parms->effector_weights) {
+ if (clmd->sim_parms && clmd->sim_parms->effector_weights) {
walk(userData, ob, (ID **)&clmd->sim_parms->effector_weights->group);
}
}