[Bf-blender-cvs] [a12f53a] gooseberry: Make sure cache item pointers are lib-linked correctly.

Lukas Tönne noreply at git.blender.org
Mon Mar 23 13:00:55 CET 2015


Commit: a12f53ab83664c2d52033236ee513c5212cfa2fc
Author: Lukas Tönne
Date:   Tue Feb 24 11:47:26 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBa12f53ab83664c2d52033236ee513c5212cfa2fc

Make sure cache item pointers are lib-linked correctly.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 6d6acc0..4f800b7 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1983,11 +1983,17 @@ static void direct_link_script(FileData *UNUSED(fd), Script *script)
 static void lib_link_cache_library(FileData *fd, Main *main)
 {
 	CacheLibrary *cachelib;
+	CacheItem *item;
+	
 	for (cachelib = main->cache_library.first; cachelib; cachelib = cachelib->id.next) {
 		if (cachelib->id.flag & LIB_NEED_LINK) {
 			cachelib->id.flag -= LIB_NEED_LINK;
 			
 			cachelib->group = newlibadr_us(fd, cachelib->id.lib, cachelib->group);
+			
+			for (item = cachelib->items.first; item; item = item->next) {
+				item->ob = newlibadr(fd, cachelib->id.lib, item->ob);
+			}
 		}
 	}
 }




More information about the Bf-blender-cvs mailing list