diff options
author | Bastien Montagne <bastien@blender.org> | 2022-02-03 17:34:56 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-02-03 17:37:05 +0300 |
commit | 946c70e6a7892985289bf8dfaead8512d33eba79 (patch) | |
tree | c3e6c59a83b659eff13b9d1032fe1f923537fd2e /source/blender/blenloader/intern | |
parent | 3bcbbf8992b0f41f19bef466129ce5b88984ac2b (diff) |
Fix (unreported) broken do_version of hidden layers from pre-2.8 files.
`BKE_collection_object_add` ensures given object is added to an editable
collection, and not e.g. a linked or override one.
However, some processes like do_version manipulate collections also from
libraries, i.e. linked collections, in those cases we need a version of
the code that unconditionnally adds the given object to the given
colleciton.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index ceddc451a46..57105ca5884 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -349,7 +349,7 @@ static void do_version_scene_collection_convert( LISTBASE_FOREACH (LinkData *, link, &sc->objects) { Object *ob = link->data; if (ob) { - BKE_collection_object_add(bmain, collection, ob); + BKE_collection_object_add_notest(bmain, collection, ob); id_us_min(&ob->id); } } @@ -459,7 +459,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) /* Note usually this would do slow collection syncing for view layers, * but since no view layers exists yet at this point it's fast. */ - BKE_collection_object_add(bmain, collections[layer], base->object); + BKE_collection_object_add_notest(bmain, collections[layer], base->object); } if (base->flag & SELECT) { @@ -1235,7 +1235,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports)) (*collection_hidden)->flag |= COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_RENDER; } - BKE_collection_object_add(bmain, *collection_hidden, ob); + BKE_collection_object_add_notest(bmain, *collection_hidden, ob); BKE_collection_object_remove(bmain, collection, ob, true); } } |