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:
authorDaniel Stokes <kupomail@gmail.com>2012-04-29 04:33:24 +0400
committerDaniel Stokes <kupomail@gmail.com>2012-04-29 04:33:24 +0400
commitafb8fffb1827a4fffc8e6b3d620a02f59b62e3a9 (patch)
tree328e3c204210d68392805f371ef4d296175b6b6e /source/blender/modifiers/intern/MOD_collision.c
parentf306b50700b05707f44b5472ac0b38d58fb01b0d (diff)
parent72ec4c813a2c544341d0c4ae83369cea60e52c9e (diff)
Merged revisions 45967-46052 from trunk/blendersoc-2011-cucumber
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 );
}