From a91a49ba8e3de3879688e9ca9c2289c231965cf2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 13 May 2016 14:07:30 +0200 Subject: 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. --- source/blender/blenkernel/intern/blendfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 4605a12f9a0..bedf262541f 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; } } -- cgit v1.2.3