diff options
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 11 |
1 files changed, 5 insertions, 6 deletions
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; } } |