diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-01-30 16:14:52 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-01-30 16:15:07 +0300 |
commit | dce8ef49ffb7c2e38455da8195b9cacba8b0424a (patch) | |
tree | e7d48946cef09d1cb94643d28f8b535419ea1518 /source/blender/blenkernel/intern/layer.c | |
parent | c1742b88a4cf58e474b3dfe9d01921105b8c8b6e (diff) |
Layers: allow anonymous collection, and set active collection when linking it
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index bb013b4aa46..39b00531222 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -30,6 +30,7 @@ #include "BLI_string_utils.h" #include "BLT_translation.h" +#include "BKE_layer.h" #include "BKE_collection.h" #include "BKE_layer.h" #include "BKE_main.h" @@ -395,6 +396,7 @@ int BKE_layer_collection_findindex(SceneLayer *sl, LayerCollection *lc) LayerCollection *BKE_collection_link(SceneLayer *sl, SceneCollection *sc) { LayerCollection *lc = layer_collection_add(sl, &sl->layer_collections, sc); + sl->active_collection = BKE_layer_collection_findindex(sl, lc); return lc; } |