Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-02-09 14:04:00 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-02-09 14:05:27 +0300
commit25074be697cb5726328aa5d064a60788c1da6aeb (patch)
treee75abc47e1d5c0db7ab4fe4db1d5989f7015c101 /source/blender/blenkernel/intern/layer.c
parent37e53ca5f3496f9a09f46afd1e4ff2f1d2d153df (diff)
Fix collection syncing when creating new collections from the outliner
We were not passing a scene collection parent to the BKE_collection_add function, which in turn made syncing not work. Right now we: * Explicitly pass the master collection in this case * Fallback to the master collection in other cases With unittest.
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r--source/blender/blenkernel/intern/layer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 9807c6e4f10..cb7b72bdabd 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -375,6 +375,7 @@ static void layer_collection_sync_flags(
static void layer_collections_sync_flags(ListBase *layer_collections_dst, const ListBase *layer_collections_src)
{
+ BLI_assert(BLI_listbase_count(layer_collections_dst) == BLI_listbase_count(layer_collections_src));
LayerCollection *layer_collection_dst = (LayerCollection *)layer_collections_dst->first;
const LayerCollection *layer_collection_src = (const LayerCollection *)layer_collections_src->first;
while (layer_collection_dst != NULL) {