From 77879ac038e3576eeeeb651ce78706cb95399098 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 8 Jun 2018 19:26:46 +0200 Subject: Fix T55376: instanced collection render visibility ignored. For physics simulation it's still fuzzy though, but this needs bigger design for how it works with view layers and visibility. --- source/blender/blenkernel/intern/pointcache.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index af13909bf89..8d55a1d2690 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1743,16 +1743,15 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup * for baking with linking dupligroups. Once we have better overrides * this can be revisited so users select the local objects directly. */ if (scene && (duplis-- > 0) && (ob->dup_group)) { - Collection *collection = ob->dup_group; - Base *base = BKE_collection_object_cache_get(collection).first; - - for (; base; base = base->next) { - if (base->object != ob) { + FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(ob->dup_group, object) + { + if (object != ob) { ListBase lb_dupli_pid; - BKE_ptcache_ids_from_object(&lb_dupli_pid, base->object, scene, duplis); + BKE_ptcache_ids_from_object(&lb_dupli_pid, object, scene, duplis); BLI_movelisttolist(lb, &lb_dupli_pid); } } + FOREACH_COLLECTION_OBJECT_RECURSIVE_END; } } -- cgit v1.2.3