diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-25 17:56:36 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-25 17:59:36 +0300 |
commit | 2aa4f8ab92a4c17f4960ff10f4a50b5b9aae91b5 (patch) | |
tree | 5a444e050db04b864b04996733211902781ba766 /source | |
parent | 7cf7b3b7e505b7a13b4f2cd04920e314e129b87f (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_cachefile.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cachefile.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_cachefile.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_cachefile.h b/source/blender/blenkernel/BKE_cachefile.h index 0d4ed2083b1..cfa5913c547 100644 --- a/source/blender/blenkernel/BKE_cachefile.h +++ b/source/blender/blenkernel/BKE_cachefile.h @@ -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 } diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index 4bf48bd614d..a86960f6268 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -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) { diff --git a/source/blender/makesrna/intern/rna_cachefile.c b/source/blender/makesrna/intern/rna_cachefile.c index 09fdeb15b10..3916e3c27a1 100644 --- a/source/blender/makesrna/intern/rna_cachefile.c +++ b/source/blender/makesrna/intern/rna_cachefile.c @@ -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; } |