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/makesrna/intern/rna_scene.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/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 9e8cb3cec97..480d4927305 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2340,7 +2340,7 @@ static void rna_Stereo3dFormat_update(Main *bmain, Scene *UNUSED(scene), Pointer static ViewLayer *rna_ViewLayer_new(ID *id, Scene *UNUSED(sce), Main *bmain, const char *name) { Scene *scene = (Scene *)id; - ViewLayer *view_layer = BKE_view_layer_add(scene, name); + ViewLayer *view_layer = BKE_view_layer_add(scene, name, NULL, VIEWLAYER_ADD_NEW); DEG_id_tag_update(&scene->id, 0); DEG_relations_tag_update(bmain); |