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:
authorJanne Karhu <jhkarh@gmail.com>2010-12-15 20:05:34 +0300
committerJanne Karhu <jhkarh@gmail.com>2010-12-15 20:05:34 +0300
commit6b2b56c35eaf1ea8d2b0d0edd2412288f0e67e19 (patch)
tree6149ab8b1d83bf4856c535eca1c823ae637b6791 /source/blender/blenkernel/intern/pointcache.c
parent2c55dd96adee33962b2a618e7678ed61c07d1446 (diff)
Fix for [#25218] No smoke is emitted when particle system starts and ends on same frame
* Depsgraph wasn't updated properly for smoke flow collision object dependencies. * Smoke also wasn't properly using the actual emission frame of the flow particles. * There was a lot of bloated logic in some parts of particle code so this fix turned into a small scale cleanup operation. ** As a result particle updating and cache usage should be a bit more stable too.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 4711e61c767..c43f53cc4af 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1883,8 +1883,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra)
{
int len; /* store the length of the string */
int i;
- int sta = pid->cache->startframe;
- int end = pid->cache->endframe;
+ int sta, end;
/* mode is same as fopen's modes */
DIR *dir;
@@ -1894,9 +1893,12 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra)
char path_full[MAX_PTCACHE_FILE];
char ext[MAX_PTCACHE_PATH];
- if(!pid->cache || pid->cache->flag & PTCACHE_BAKED)
+ if(!pid || !pid->cache || pid->cache->flag & PTCACHE_BAKED)
return;
+ sta = pid->cache->startframe;
+ end = pid->cache->endframe;
+
#ifndef DURIAN_POINTCACHE_LIB_OK
/* don't allow clearing for linked objects */
if(pid->ob->id.lib)