diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-04-30 22:12:50 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-04-30 22:48:07 +0300 |
commit | 1aa093ce9c426f047949448594acb79f65a8ee74 (patch) | |
tree | 1611c0d88f2810c4a81c786dce40e9563d6d2bde /source/blender/blenkernel/intern | |
parent | ae7db030dab0f350442fc7b69529bdc1c5c334fa (diff) |
Fix T63343: Duplicated object is hidden whereas it should not
We were mixing ob->flag and ob->base_flag.
We shouldn't be using ob->flag & SELECT in 2.8x.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 895c21ba9f1..e0bf62402d2 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1751,18 +1751,20 @@ void BKE_scene_base_flag_to_objects(ViewLayer *view_layer) } } +/** + * Synchronize object base flags + * + * This is usually handled by the depsgraph. + * However, in rare occasions we need to use the latest object flags + * before depsgraph is fully updated. + * + * It should (ideally) only run for copy-on-written objects since this is + * runtime data generated per-viewlayer. + */ void BKE_scene_object_base_flag_sync_from_base(Base *base) { Object *ob = base->object; - - ob->flag = base->flag; - - if ((base->flag & BASE_SELECTED) != 0) { - ob->flag |= SELECT; - } - else { - ob->flag &= ~SELECT; - } + ob->base_flag = base->flag; } void BKE_scene_disable_color_management(Scene *scene) |