[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33471] trunk/blender/source/blender/ blenloader/intern/readfile.c: Bug fix #21900
Ton Roosendaal
ton at blender.org
Sat Dec 4 16:45:16 CET 2010
Revision: 33471
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33471
Author: ton
Date: 2010-12-04 16:45:16 +0100 (Sat, 04 Dec 2010)
Log Message:
-----------
Bug fix #21900
Issue with Library linking: if you already have libraries linked in,
and you attempt to link more data, using internally already linked
stuff (like a group with group links) the linkage would fail. It did
resolve on save-load though.
There's a long commented history in this code explaining it. I found
out it was because of manual step-by-step linking versus normal file
reads. In the first case, the "lib pointer map" was missing references.
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-12-04 14:26:45 UTC (rev 33470)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-12-04 15:45:16 UTC (rev 33471)
@@ -11481,8 +11481,12 @@
* lib_indirect.blend but lib.blend does too, linking in a Scene or Group from lib.blend can result in an
* empty without the dupli group referenced. Once you save and reload the group would appier. - Campbell */
/* This crashes files, must look further into it */
- /*oldnewmap_insert(fd->libmap, bhead->old, id, 1);*/
+ /* Update: the issue is that in file reading, the oldnewmap is OK, but for existing data, it has to be
+ inserted in the map to be found! */
+ if(id->flag & LIB_PRE_EXISTING)
+ oldnewmap_insert(fd->libmap, bhead->old, id, 1);
+
change_idid_adr_fd(fd, bhead->old, id);
// commented because this can print way too much
// if(G.f & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name);
More information about the Bf-blender-cvs
mailing list