[Bf-blender-cvs] [e1909958d9e] master: Fix lib_link_cachefile.
Bastien Montagne
noreply at git.blender.org
Tue Mar 28 10:19:03 CEST 2017
Commit: e1909958d9ec48333a7bfd0d34aede66efc9b1ad
Author: Bastien Montagne
Date: Tue Mar 28 10:15:52 2017 +0200
Branches: master
https://developer.blender.org/rBe1909958d9ec48333a7bfd0d34aede66efc9b1ad
Fix lib_link_cachefile.
That one was:
* Resetting non-ID pointers (lib_link_xxx funcs should only affect ID
pointers, everything else shall be done in direct_link_xxx func).
* Even worse, always calling lib_link_animdata, even when
LIB_TAG_NEED_LINK tag was unset...
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 706f4a4606e..18c4034c0dd 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2713,22 +2713,16 @@ static void lib_link_cachefiles(FileData *fd, Main *bmain)
for (CacheFile *cache_file = bmain->cachefiles.first; cache_file; cache_file = cache_file->id.next) {
if (cache_file->id.tag & LIB_TAG_NEED_LINK) {
IDP_LibLinkProperty(cache_file->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ lib_link_animdata(fd, &cache_file->id, cache_file->adt);
cache_file->id.tag &= ~LIB_TAG_NEED_LINK;
}
-
- BLI_listbase_clear(&cache_file->object_paths);
- cache_file->handle = NULL;
- cache_file->handle_mutex = NULL;
-
- if (cache_file->adt) {
- lib_link_animdata(fd, &cache_file->id, cache_file->adt);
- }
}
}
static void direct_link_cachefile(FileData *fd, CacheFile *cache_file)
{
+ BLI_listbase_clear(&cache_file->object_paths);
cache_file->handle = NULL;
cache_file->handle_mutex = NULL;
More information about the Bf-blender-cvs
mailing list