Commit: 99d2d6f3871f88c485684c6f9c8b5f0ab0d8dda3 Author: Sybren A. Stüvel Date: Tue Apr 25 17:03:15 2017 +0200 Branches: blender2.8 https://developer.blender.org/rB99d2d6f3871f88c485684c6f9c8b5f0ab0d8dda3
Alembic import: don't use global main =================================================================== M source/blender/blenkernel/BKE_cachefile.h M source/blender/blenkernel/intern/cachefile.c M source/blender/makesrna/intern/rna_cachefile.c =================================================================== diff --git a/source/blender/blenkernel/BKE_cachefile.h b/source/blender/blenkernel/BKE_cachefile.h index cfa5913c547..b8e08524dbe 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 CacheFile *cache_file); +void BKE_cachefile_clean(struct Main *bmain, struct CacheFile *cache_file); #ifdef __cplusplus } diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index a86960f6268..859aa628781 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -204,9 +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(CacheFile *cache_file) +void BKE_cachefile_clean(struct Main *bmain, CacheFile *cache_file) { - for (Object *ob = G.main->object.first; ob; ob = ob->id.next) { + for (Object *ob = bmain->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 3916e3c27a1..a3b1d584ef5 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(cache_file); + BKE_cachefile_clean(bmain, cache_file); BLI_freelistN(&cache_file->object_paths); cache_file->flag &= ~CACHEFILE_DIRTY; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs