diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-24 05:21:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-24 05:21:43 +0400 |
commit | d7e30369f8799d31a81a5b0e87122263d164ec16 (patch) | |
tree | e022d2880a81d26646ea21e09cdd6a205bfa6615 /source/blender/blenkernel/intern/smoke.c | |
parent | ebe01d06bcb3ed42d8466fdf133fe8810c5ecd2d (diff) |
commented smoke collision derived mesh,
was storing its own copy of the collision mesh but never using it.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 60941ef78a3..424f97f57ed 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -77,6 +77,9 @@ #include "BKE_smoke.h" +/* UNUSED so far, may be enabled later */ +/* #define USE_SMOKE_COLLISION_DM */ + #ifdef WITH_SMOKE #ifdef _WIN32 @@ -617,9 +620,11 @@ static void smokeModifier_freeCollision(SmokeModifierData *smd) smd->coll->bvhtree = NULL; } +#ifdef USE_SMOKE_COLLISION_DM if(smd->coll->dm) smd->coll->dm->release(smd->coll->dm); smd->coll->dm = NULL; +#endif MEM_freeN(smd->coll); smd->coll = NULL; @@ -682,9 +687,11 @@ void smokeModifier_reset(struct SmokeModifierData *smd) smd->coll->bvhtree = NULL; } +#ifdef USE_SMOKE_COLLISION_DM if(smd->coll->dm) smd->coll->dm->release(smd->coll->dm); smd->coll->dm = NULL; +#endif } } @@ -772,7 +779,10 @@ void smokeModifier_createType(struct SmokeModifierData *smd) smd->coll->points = NULL; smd->coll->numpoints = 0; smd->coll->bvhtree = NULL; + +#ifdef USE_SMOKE_COLLISION_DM smd->coll->dm = NULL; +#endif } } } @@ -1339,11 +1349,13 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM { // XXX TODO smd->time = scene->r.cfra; - + +#ifdef USE_SMOKE_COLLISION_DM if(smd->coll->dm) smd->coll->dm->release(smd->coll->dm); smd->coll->dm = CDDM_copy(dm); +#endif // rigid movement support copy_m4_m4(smd->coll->mat_old, smd->coll->mat); |