[Bf-blender-cvs] [a91a49b] master: Fix T48416: Impossible to copy a linked object from a file to another one mantaining the linked library.

Bastien Montagne noreply at git.blender.org
Fri May 13 14:12:42 CEST 2016


Commit: a91a49ba8e3de3879688e9ca9c2289c231965cf2
Author: Bastien Montagne
Date:   Fri May 13 14:07:30 2016 +0200
Branches: master
https://developer.blender.org/rBa91a49ba8e3de3879688e9ca9c2289c231965cf2

Fix T48416: Impossible to copy a linked object from a file to another one mantaining the linked library.

When writing temp blenbuffer file, libraries of linked datablocks where not tagged correctly, which
means they were not put in the temp Main used to write the buffer, resulting in implicit localization
of linked data.

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

M	source/blender/blenkernel/intern/blendfile.c

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

diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 4605a12..bedf262 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -492,6 +492,9 @@ static void blendfile_write_partial_cb(void *UNUSED(handle), Main *UNUSED(bmain)
 		/* only tag for need-expand if not done, prevents eternal loops */
 		if ((id->tag & LIB_TAG_DOIT) == 0)
 			id->tag |= LIB_TAG_NEED_EXPAND | LIB_TAG_DOIT;
+
+		if (id->lib && (id->lib->id.tag & LIB_TAG_DOIT) == 0)
+			id->lib->id.tag |= LIB_TAG_DOIT;
 	}
 }




More information about the Bf-blender-cvs mailing list