diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-01-04 00:28:19 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-01-04 00:33:00 +0300 |
commit | e1cbac715a85204bad48035eb8ee1af79648cd83 (patch) | |
tree | e8e17e750ac1c40422cba8de86be3138a72afb0e /source | |
parent | 10f0635d326e561dfea2675cdd5465ca3b861f24 (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')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 1 |
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); |