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-04-28 10:31:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-28 10:31:57 +0400
commitb340f930ec5639f24e7e2d47fab221fb752b61dd (patch)
tree0e880a36bb528d133af6d10701fc090716b3b7f8 /source/blender/modifiers/intern/MOD_collision.c
parent09dc600839904a198ab4ba3fad62ce58c2d3aa07 (diff)
style cleanup: changes to brace placement / newlines - for/while/if/switch
Diffstat (limited to 'source/blender/modifiers/intern/MOD_collision.c')
-rw-r--r--source/blender/modifiers/intern/MOD_collision.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c
index b3faf6c140a..4c5ce184c22 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -71,8 +71,7 @@ static void freeData(ModifierData *md)
{
CollisionModifierData *collmd = (CollisionModifierData*) md;
- if (collmd)
- {
+ if (collmd) {
if (collmd->bvhtree)
BLI_bvhtree_free(collmd->bvhtree);
if (collmd->x)
@@ -120,14 +119,12 @@ static void deformVerts(ModifierData *md, Object *ob,
if (derivedData) dm = CDDM_copy(derivedData);
else if (ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob);
- if (!ob->pd)
- {
+ if (!ob->pd) {
printf("CollisionModifier deformVerts: Should not happen!\n");
return;
}
- if (dm)
- {
+ if (dm) {
float current_time = 0;
unsigned int numverts = 0;
@@ -141,20 +138,17 @@ static void deformVerts(ModifierData *md, Object *ob,
numverts = dm->getNumVerts ( dm );
- if ((current_time > collmd->time_xnew)|| (BKE_ptcache_get_continue_physics()))
- {
+ if ((current_time > collmd->time_xnew)|| (BKE_ptcache_get_continue_physics())) {
unsigned int i;
// check if mesh has changed
if (collmd->x && (numverts != collmd->numverts))
freeData((ModifierData *)collmd);
- if (collmd->time_xnew == -1000) // first time
- {
+ if (collmd->time_xnew == -1000) { /* first time */
collmd->x = dm->dupVertArray(dm); // frame start position
- for ( i = 0; i < numverts; i++ )
- {
+ for ( i = 0; i < numverts; i++ ) {
// we save global positions
mul_m4_v3( ob->obmat, collmd->x[i].co );
}