Alembic import: removed BaseLegacy from BKE_cachefile_clean
Now we just iterate over all objects. It may be a better idea to use a smarter approach for performance. However, since this function is not called regularly (only when changing Alembic file paths), it's not a very big deal.
This commit is contained in:
@@ -63,7 +63,7 @@ bool BKE_cachefile_filepath_get(
|
||||
|
||||
float BKE_cachefile_time_offset(struct CacheFile *cache_file, const float time, const float fps);
|
||||
|
||||
void BKE_cachefile_clean(struct Scene *scene, struct CacheFile *cache_file);
|
||||
void BKE_cachefile_clean(struct CacheFile *cache_file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -204,11 +204,9 @@ float BKE_cachefile_time_offset(CacheFile *cache_file, const float time, const f
|
||||
}
|
||||
|
||||
/* TODO(kevin): replace this with some depsgraph mechanism, or something similar. */
|
||||
void BKE_cachefile_clean(Scene *scene, CacheFile *cache_file)
|
||||
void BKE_cachefile_clean(CacheFile *cache_file)
|
||||
{
|
||||
for (BaseLegacy *base = scene->base.first; base; base = base->next) {
|
||||
Object *ob = base->object;
|
||||
|
||||
for (Object *ob = G.main->object.first; ob; ob = ob->id.next) {
|
||||
ModifierData *md = modifiers_findByType(ob, eModifierType_MeshSequenceCache);
|
||||
|
||||
if (md) {
|
||||
|
||||
@@ -63,7 +63,7 @@ static void rna_CacheFile_update_handle(Main *bmain, Scene *scene, PointerRNA *p
|
||||
CacheFile *cache_file = ptr->data;
|
||||
|
||||
if ((cache_file->flag & CACHEFILE_DIRTY) != 0) {
|
||||
BKE_cachefile_clean(scene, cache_file);
|
||||
BKE_cachefile_clean(cache_file);
|
||||
BLI_freelistN(&cache_file->object_paths);
|
||||
cache_file->flag &= ~CACHEFILE_DIRTY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user