diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-24 15:21:24 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-24 15:28:01 +0300 |
commit | 7484c6c5ee68c313e72394f7538d1c7386c0ced7 (patch) | |
tree | bba6ceda59eb83244fb54a4925cb5f1a1bc9c3f7 /source/blender/blenkernel/intern | |
parent | bac740085ccc65ad7852637e59a5ba5fdc65e338 (diff) |
Fix non-instanced groups in no-collection file creating collections
This is a corner-case, but one that is too easy to reproduce:
* Unlink all the collections of active view layer.
* Link a group without "Instancing" it.
Diffstat (limited to 'source/blender/blenkernel/intern')
-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 0e0290414a4..66a5e67583c 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -386,6 +386,8 @@ LayerCollection *BKE_layer_collection_get_active_ensure(Scene *scene, SceneLayer /* When there is no collection linked to this SceneLayer, create one. */ SceneCollection *sc = BKE_collection_add(scene, NULL, NULL); lc = BKE_collection_link(sl, sc); + /* New collection has to be the active one. */ + BLI_assert(lc == BKE_layer_collection_get_active(sl)); } return lc; |