Fix T64304: Objects in appended scene from 2.79 file disappear after saving.

Versionning code generating collections from old 2.79 scene layers was
setting new collections' library from scene, but it also needs to
properly set the `LIB_TAG_INDIRECT` tag, otherwise localizing code does
not know what to do, and most of append process fails.
This commit is contained in:
Bastien Montagne 2019-05-10 10:09:23 +02:00
parent 6b082278d1
commit 44ecea1ccb
Notes: blender-bot 2023-02-14 05:41:57 +01:00
Referenced by issue #64304, Objects in appended scene disappear after saving
2 changed files with 4 additions and 1 deletions

View File

@ -1860,7 +1860,7 @@ static void library_make_local_copying_check(ID *id,
* (except group and objects ones).
*/
/* Note: Old (2.77) version was simply making (tagging) data-blocks as local,
* without actually making any check whether * they were also indirectly used or not...
* without actually making any check whether they were also indirectly used or not...
*
* Current version uses regular id_make_local callback, with advanced pre-processing step to detect
* all cases of IDs currently indirectly used, but which will be used by local data only once this

View File

@ -421,6 +421,9 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
Collection *collection = BKE_collection_add(bmain, collection_master, name);
collection->id.lib = scene->id.lib;
if (collection->id.lib != NULL) {
collection->id.tag |= LIB_TAG_INDIRECT;
}
collections[layer] = collection;
if (!(scene->lay & (1 << layer))) {