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 Genrich <daniel.genrich@gmx.net>2009-08-26 03:39:49 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2009-08-26 03:39:49 +0400
commit3f5a2a11944a2e983d62babe8bb02b03e14c805d (patch)
treeb39ac059564ec9ff9514d08190faa137335845f4 /source/blender/blenkernel/intern/pointcache.c
parentc4a1c8fbeb86396788866d6dc3eb1b5b5dc3f67d (diff)
Smoke:
*Bugfix for crash on using a plane as smoke domain (reported by DingTo) * Bringing slowly high res back, not yet working
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index d9740091912..42bea260450 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -703,11 +703,44 @@ void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeMo
pid->calldata= smd;
pid->type= PTCACHE_TYPE_SMOKE_DOMAIN;
- pid->stack_index= sds->point_cache->index;
+ pid->stack_index= sds->point_cache[0]->index;
- pid->cache= sds->point_cache;
- pid->cache_ptr= &sds->point_cache;
- pid->ptcaches= &sds->ptcaches;
+ pid->cache= sds->point_cache[0];
+ pid->cache_ptr= &(sds->point_cache[0]);
+ pid->ptcaches= &(sds->ptcaches[0]);
+
+ pid->totpoint= pid->totwrite= ptcache_totpoint_smoke;
+
+ pid->write_elem= NULL;
+ pid->read_elem= NULL;
+
+ pid->read_stream = ptcache_read_smoke;
+ pid->write_stream = ptcache_write_smoke;
+
+ pid->interpolate_elem= NULL;
+
+ pid->write_header= ptcache_write_basic_header;
+ pid->read_header= ptcache_read_basic_header;
+
+ pid->data_types= (1<<BPHYS_DATA_LOCATION); // bogus values tot make pointcache happy
+ pid->info_types= 0;
+}
+
+void BKE_ptcache_id_from_smoke_turbulence(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd)
+{
+ SmokeDomainSettings *sds = smd->domain;
+
+ memset(pid, 0, sizeof(PTCacheID));
+
+ pid->ob= ob;
+ pid->calldata= smd;
+
+ pid->type= PTCACHE_TYPE_SMOKE_HIGHRES;
+ pid->stack_index= sds->point_cache[1]->index;
+
+ pid->cache= sds->point_cache[1];
+ pid->cache_ptr= &sds->point_cache[1];
+ pid->ptcaches= &sds->ptcaches[1];
pid->totpoint= pid->totwrite= ptcache_totpoint_smoke;
@@ -1792,10 +1825,7 @@ int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode)
else if(pid->type == PTCACHE_TYPE_PARTICLES)
psys_reset(pid->calldata, PSYS_RESET_DEPSGRAPH);
else if(pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
- {
smokeModifier_reset(pid->calldata);
- printf("reset PTCACHE_TYPE_SMOKE_DOMAIN\n");
- }
}
if(clear)
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);