Fix T61287: Object restrict viewport ignored in instanced collection
authorDalai Felinto <dfelinto@gmail.com>
Fri, 8 Feb 2019 15:51:13 +0000 (13:51 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Fri, 8 Feb 2019 15:57:12 +0000 (13:57 -0200)
commit02581a7ef819bfd388420114280ab4a83f155eaf
treee7f701e53a86f4185eadf3c24a709dc307d1e60c
parent5228a10f6d4256e9261eb8fcad04a46688690520
Fix T61287: Object restrict viewport ignored in instanced collection

make_duplis_collection() depends on the collection object cache,
which was not freed upon object viewport disable change.

The best way to reproduce the bug was to instance the default
collection, disable the cube, save and re-open the file.
Now even if you set the original cube to be enabled, you wouldn't see
the instanced one until you forced collection cache to be freed (e.g.,
changing a collection disable state.
source/blender/editors/space_outliner/outliner_draw.c
source/blender/makesrna/intern/rna_object.c