Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pointcache.c
| Show First 20 Lines • Show All 3,443 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| PointCache *cache; | PointCache *cache; | ||||
| while ((cache = BLI_pophead(ptcaches))) { | while ((cache = BLI_pophead(ptcaches))) { | ||||
| BKE_ptcache_free(cache); | BKE_ptcache_free(cache); | ||||
| } | } | ||||
| } | } | ||||
| static PointCache *ptcache_copy(PointCache *cache, bool copy_data) | static PointCache *ptcache_copy(PointCache *cache, const bool copy_data) | ||||
| { | { | ||||
| PointCache *ncache; | PointCache *ncache; | ||||
| ncache= MEM_dupallocN(cache); | ncache= MEM_dupallocN(cache); | ||||
| BLI_listbase_clear(&ncache->mem_cache); | BLI_listbase_clear(&ncache->mem_cache); | ||||
| if (copy_data == false) { | if (copy_data == false) { | ||||
| Show All 26 Lines | static PointCache *ptcache_copy(PointCache *cache, const bool copy_data) | ||||
| /* hmm, should these be copied over instead? */ | /* hmm, should these be copied over instead? */ | ||||
| ncache->edit = NULL; | ncache->edit = NULL; | ||||
| return ncache; | return ncache; | ||||
| } | } | ||||
| /* returns first point cache */ | /* returns first point cache */ | ||||
| PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, const ListBase *ptcaches_old, bool copy_data) | PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, const ListBase *ptcaches_old, const int flag) | ||||
| { | { | ||||
| PointCache *cache = ptcaches_old->first; | PointCache *cache = ptcaches_old->first; | ||||
| BLI_listbase_clear(ptcaches_new); | BLI_listbase_clear(ptcaches_new); | ||||
| for (; cache; cache=cache->next) | for (; cache; cache=cache->next) { | ||||
| BLI_addtail(ptcaches_new, ptcache_copy(cache, copy_data)); | BLI_addtail(ptcaches_new, ptcache_copy(cache, (flag & LIB_ID_COPY_CACHES) != 0)); | ||||
| } | |||||
| return ptcaches_new->first; | return ptcaches_new->first; | ||||
| } | } | ||||
| /* Disabled this code; this is being called on scene_update_tagged, and that in turn gets called on | /* Disabled this code; this is being called on scene_update_tagged, and that in turn gets called on | ||||
| * every user action changing stuff, and then it runs a complete bake??? (ton) */ | * every user action changing stuff, and then it runs a complete bake??? (ton) */ | ||||
| /* Baking */ | /* Baking */ | ||||
| ▲ Show 20 Lines • Show All 583 Lines • Show Last 20 Lines | |||||