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-01-04 00:28:19 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-01-04 00:33:00 +0300
commite1cbac715a85204bad48035eb8ee1af79648cd83 (patch)
treee8e17e750ac1c40422cba8de86be3138a72afb0e /source/blender/blenkernel/intern/collection.c
parent10f0635d326e561dfea2675cdd5465ca3b861f24 (diff)
Fix FOREACH_SCENE_COLLECTION/FOREACH_SCENE_OBJECT for nested collections
This fixes any function that relied on these iterators such as: * Outliner Same Type * Metaballs * scene.objects We were not considering the collections when there was collections nested to the collections nested to the master collection. It includes a unittest.
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index e2b10de575c..4830e9456cd 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -725,6 +725,7 @@ void BKE_scene_collections_iterator_begin(BLI_Iterator *iter, void *data_in)
data->owner_id = owner_id;
iter->data = data;
+ iter->valid = true;
scene_collections_array(owner_id, (SceneCollection ***)&data->array, &data->tot);
BLI_assert(data->tot != 0);