diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-07-12 18:51:54 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-07-18 01:38:16 +0300 |
commit | bfa6cb3a7d9a867d4f664e169ab8b65e2bd2142b (patch) | |
tree | 9f1dda12fc79dec635ee87d28ec5dbd8df2fabf4 /source/blender/blenkernel | |
parent | 158eb98c2233c3099dc0fd6a1e399478750cc7a6 (diff) |
Fix T64312: Selection inconsistencies when switching collections
Basically layer_collection_sync was calling BKE_base_eval_flags right away while
iterating over the bases.
However when a parent/sibling collection is to influence the collection flag of
an object that exists in more than one collection, it is too late since we
deselect the object in BKE_base_eval_flags right away.
Related to T64312.
Reviewers: sergey, brecht
Differential Revision: https://developer.blender.org/D5243
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 2b064c6b2a7..7dc04214ba5 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -745,9 +745,6 @@ static short layer_collection_sync(ViewLayer *view_layer, } lc->runtime_flag |= LAYER_COLLECTION_HAS_OBJECTS; - - /* Make sure flags on base are usable right away. */ - BKE_base_eval_flags(base); } runtime_flag |= lc->runtime_flag; @@ -814,6 +811,10 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer) BLI_freelistN(&view_layer->object_bases); view_layer->object_bases = new_object_bases; + for (Base *base = view_layer->object_bases.first; base; base = base->next) { + BKE_base_eval_flags(base); + } + /* Always set a valid active collection. */ LayerCollection *active = view_layer->active_collection; |