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.
This commit is contained in:
Bastien Montagne 2016-05-13 14:07:30 +02:00
parent 5e0ec49570
commit a91a49ba8e
Notes: blender-bot 2023-02-14 07:53:51 +01:00
Referenced by issue #48416, Impossible to copy a linked object from a file to another one mantaining the linked library
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}
}