From d7e30369f8799d31a81a5b0e87122263d164ec16 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Jan 2012 01:21:43 +0000 Subject: commented smoke collision derived mesh, was storing its own copy of the collision mesh but never using it. --- source/blender/blenkernel/intern/smoke.c | 14 +++++++++++++- source/blender/makesdna/DNA_smoke_types.h | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'source') 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); diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index ed764c4f644..753f1374774 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -138,7 +138,8 @@ typedef struct SmokeFlowSettings { typedef struct SmokeCollSettings { struct SmokeModifierData *smd; /* for fast RNA access */ struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ - struct DerivedMesh *dm; + +// struct DerivedMesh *dm; // UNUSED, ifdef'd in code for now. float *points; float *points_old; float *vel; -- cgit v1.2.3