From e1cbac715a85204bad48035eb8ee1af79648cd83 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 3 Jan 2018 19:28:19 -0200 Subject: 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. --- source/blender/blenkernel/intern/collection.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/intern/collection.c') 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); -- cgit v1.2.3