diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index e4dc8d006ae..5cbfcb66bf9 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -512,12 +512,13 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) } } + BKE_view_layer_synced_ensure(scene, view_layer); /* for convenience set the same active object in all the layers */ if (scene->basact) { view_layer->basact = BKE_view_layer_base_find(view_layer, scene->basact->object); } - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { if ((base->flag & BASE_SELECTABLE) && (base->object->flag & SELECT)) { base->flag |= BASE_SELECTED; } @@ -537,13 +538,14 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) view_layer->flag &= ~VIEW_LAYER_RENDER; } + BKE_view_layer_synced_ensure(scene, view_layer); /* convert active base */ if (scene->basact) { view_layer->basact = BKE_view_layer_base_find(view_layer, scene->basact->object); } /* convert selected bases */ - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { + LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) { if ((base->flag & BASE_SELECTABLE) && (base->object->flag & SELECT)) { base->flag |= BASE_SELECTED; } |