Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-03-31 11:22:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-03-31 11:22:18 +0400
commit2910d75f2c68f79054e47348925f13b127ada9d6 (patch)
treecbb146ee56708892fdc5ff92ceba84e4d3479c6f /source/blender/blenkernel
parent7af91f6663564f1c3c85960b95f2c6e3ca213231 (diff)
svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27875:27895
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/library.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 0eaafcb67ed..8605cf51b68 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1236,11 +1236,17 @@ static void image_fix_relative_path(Image *ima)
#define LIBTAG(a) if(a && a->id.lib) {a->id.flag &=~LIB_INDIRECT; a->id.flag |= LIB_EXTERN;}
-static void lib_indirect_test_id(ID *id)
+static void lib_indirect_test_id(ID *id, Library *lib)
{
- if(id->lib)
+ if(id->lib) {
+ /* datablocks that were indirectly related are now direct links
+ * without this, appending data that has a link to other data will fail to write */
+ if(lib && id->lib->parent == lib) {
+ id_lib_extern(id);
+ }
return;
+ }
if(GS(id->name)==ID_OB) {
Object *ob= (Object *)id;
@@ -1336,7 +1342,7 @@ void all_local(Library *lib, int untagged_only)
a= set_listbasepointers(G.main, lbarray);
while(a--) {
for(id= lbarray[a]->first; id; id=id->next)
- lib_indirect_test_id(id);
+ lib_indirect_test_id(id, lib);
}
}