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.
}
if (changed_restrict_view) {
- BKE_main_collection_sync(bmain);
+ BKE_main_collection_sync_remap(bmain);
DEG_id_tag_update(&ob->id, LIB_TAG_COPIED_ON_WRITE);
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);
static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Object *ob = ptr->id.data;
- BKE_main_collection_sync(bmain);
+ BKE_main_collection_sync_remap(bmain);
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);