diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 7 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cc2b73d87f5..a86363cf7ad 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2929,6 +2929,7 @@ static void direct_link_pointcache(FileData *fd, PointCache *cache) { if((cache->flag & PTCACHE_DISK_CACHE)==0) { PTCacheMem *pm; + PTCacheExtra *extra; int i; link_list(fd, &cache->mem_cache); @@ -2948,6 +2949,11 @@ static void direct_link_pointcache(FileData *fd, PointCache *cache) SWITCH_INT(poin[j]); } } + + link_list(fd, &pm->extradata); + + for(extra=pm->extradata.first; extra; extra=extra->next) + extra->data = newdataadr(fd, extra->data); } } else @@ -3156,6 +3162,7 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles) pa->boid = NULL; } + psys->fluid_springs = newdataadr(fd, psys->fluid_springs); psys->child = newdataadr(fd,psys->child); psys->effectors = NULL; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 8230050fc2f..fd8fb8ad8a6 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -780,6 +780,8 @@ static void write_pointcaches(WriteData *wd, ListBase *ptcaches) PTCacheMem *pm = cache->mem_cache.first; for(; pm; pm=pm->next) { + PTCacheExtra *extra = pm->extradata.first; + writestruct(wd, DATA, "PTCacheMem", 1, pm); for(i=0; i<BPHYS_TOT_DATA; i++) { @@ -790,6 +792,13 @@ static void write_pointcaches(WriteData *wd, ListBase *ptcaches) writestruct(wd, DATA, ptcache_datastruct[i], pm->totpoint, pm->data[i]); } } + + for(; extra; extra=extra->next) { + if(strcmp(ptcache_extra_datastruct[extra->type], "")==0) + continue; + writestruct(wd, DATA, "PTCacheExtra", 1, extra); + writestruct(wd, DATA, ptcache_extra_datastruct[extra->type], extra->totdata, extra->data); + } } } } @@ -850,6 +859,9 @@ static void write_particlesystems(WriteData *wd, ListBase *particles) if(psys->particles->boid && psys->part->phystype == PART_PHYS_BOIDS) writestruct(wd, DATA, "BoidParticle", psys->totpart, psys->particles->boid); + + if(psys->part->fluid && psys->part->phystype == PART_PHYS_FLUID && (psys->part->fluid->flag & SPH_VISCOELASTIC_SPRINGS)) + writestruct(wd, DATA, "ParticleSpring", psys->tot_fluidsprings, psys->fluid_springs); } pt = psys->targets.first; for(; pt; pt=pt->next) |