diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-10 11:09:23 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-10 11:09:23 +0300 |
commit | 44ecea1ccbc06680cfc12a89799badbf0cc43ac9 (patch) | |
tree | 50c9f00ec1204847c5e06481ede8db03055a991b /source/blender | |
parent | 6b082278d19599100cc0b50cc96e4fa00865d093 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index ad0c405ab28..3e6f93d1323 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -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 diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f1c92dedd33..b958d7532bf 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -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))) { |