diff options
author | Chris Clyne <lateasusual> | 2020-03-26 21:33:27 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-26 21:36:51 +0300 |
commit | d1972e50cbef6e2a40ffc259f10e08493511dc66 (patch) | |
tree | 1a32794c1c85fef8bc1307ecd7fb2ad562c20b91 /source/blender/blenloader/intern/versioning_280.c | |
parent | 839f0cfa41f2f209774b3a7d222529954a788466 (diff) |
Add option to Copy the active view layer, and add an empty view layer
Modify the view layer add operator (and underlying `BKE_view_layer_add`)
to allow for copying the current view layer, as well as adding a new one
but with all LayerCollections disabled by default (this is important for
heavy scenes where currently adding view layers can take a long time due
to enabling every collection by default).
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D6862
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a7c9c073018..eda13dce084 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -462,7 +462,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) const bool need_default_renderlayer = scene->r.layers.first == NULL; for (SceneRenderLayer *srl = scene->r.layers.first; srl; srl = srl->next) { - ViewLayer *view_layer = BKE_view_layer_add(scene, srl->name); + ViewLayer *view_layer = BKE_view_layer_add(scene, srl->name, NULL, VIEWLAYER_ADD_NEW); if (srl->layflag & SCE_LAY_DISABLE) { view_layer->flag &= ~VIEW_LAYER_RENDER; @@ -528,7 +528,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) /* If render layers included overrides, or there are no render layers, * we also create a vanilla viewport layer. */ if (have_override || need_default_renderlayer) { - ViewLayer *view_layer = BKE_view_layer_add(scene, "Viewport"); + ViewLayer *view_layer = BKE_view_layer_add(scene, "Viewport", NULL, VIEWLAYER_ADD_NEW); /* If we ported all the original render layers, * we don't need to make the viewport layer renderable. */ |