Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pointcache.c
| Show First 20 Lines • Show All 3,597 Lines • ▼ Show 20 Lines | if ((cache->flag & PTCACHE_BAKED)==0) { | ||||
| else { | else { | ||||
| endframe = MIN2(endframe, cache->endframe); | endframe = MIN2(endframe, cache->endframe); | ||||
| } | } | ||||
| cache->flag &= ~PTCACHE_BAKED; | cache->flag &= ~PTCACHE_BAKED; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| for (SETLOOPER(scene, sce_iter, base)) { | for (SETLOOPER(scene, NULL, sce_iter, base)) { | ||||
| /* cache/bake everything in the scene */ | /* cache/bake everything in the scene */ | ||||
| BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); | BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); | ||||
| for (pid=pidlist.first; pid; pid=pid->next) { | for (pid=pidlist.first; pid; pid=pid->next) { | ||||
| cache = pid->cache; | cache = pid->cache; | ||||
| if ((cache->flag & PTCACHE_BAKED)==0) { | if ((cache->flag & PTCACHE_BAKED)==0) { | ||||
| if (pid->type==PTCACHE_TYPE_PARTICLES) { | if (pid->type==PTCACHE_TYPE_PARTICLES) { | ||||
| ParticleSystem *psys = (ParticleSystem*)pid->calldata; | ParticleSystem *psys = (ParticleSystem*)pid->calldata; | ||||
| ▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | if (pid) { | ||||
| if (bake) { | if (bake) { | ||||
| cache->flag |= PTCACHE_BAKED; | cache->flag |= PTCACHE_BAKED; | ||||
| /* write info file */ | /* write info file */ | ||||
| if (cache->flag & PTCACHE_DISK_CACHE) | if (cache->flag & PTCACHE_DISK_CACHE) | ||||
| BKE_ptcache_write(pid, 0); | BKE_ptcache_write(pid, 0); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| for (SETLOOPER(scene, sce_iter, base)) { | for (SETLOOPER(scene, NULL, sce_iter, base)) { | ||||
| BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); | BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); | ||||
| for (pid=pidlist.first; pid; pid=pid->next) { | for (pid=pidlist.first; pid; pid=pid->next) { | ||||
| /* skip hair particles */ | /* skip hair particles */ | ||||
| if (pid->type==PTCACHE_TYPE_PARTICLES && ((ParticleSystem*)pid->calldata)->part->type == PART_HAIR) | if (pid->type==PTCACHE_TYPE_PARTICLES && ((ParticleSystem*)pid->calldata)->part->type == PART_HAIR) | ||||
| continue; | continue; | ||||
| cache = pid->cache; | cache = pid->cache; | ||||
| ▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines | |||||