diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-20 19:30:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-20 20:00:51 +0300 |
commit | 9123595b52b3354082c0eb77134599784df34899 (patch) | |
tree | cb731a74665078531afa9ca98138fca5be4600a9 /source/blender/blenkernel/intern/collection.c | |
parent | 9a88bd55903a5c7df0365007bef8dd182f6eb481 (diff) |
Fix T64705: can't drive object visibility in collection instances
Not the cleanest solution, but should be fine until we add support for driving
collection visibility and revise this system as a whole.
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 5b718909601..ac55846714b 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -443,15 +443,13 @@ static void collection_object_cache_fill(ListBase *lb, Collection *collection, i BLI_addtail(lb, base); } - int object_restrict = base->object->restrictflag; - - if (((child_restrict & COLLECTION_RESTRICT_VIEWPORT) == 0) && - ((object_restrict & OB_RESTRICT_VIEWPORT) == 0)) { + /* Only collection flags are checked here currently, object restrict flag is checked + * in FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN since it can be animated + * without updating the cache. */ + if (((child_restrict & COLLECTION_RESTRICT_VIEWPORT) == 0)) { base->flag |= BASE_ENABLED_VIEWPORT; } - - if (((child_restrict & COLLECTION_RESTRICT_RENDER) == 0) && - ((object_restrict & OB_RESTRICT_RENDER) == 0)) { + if (((child_restrict & COLLECTION_RESTRICT_RENDER) == 0)) { base->flag |= BASE_ENABLED_RENDER; } } |