From 8a1a0532503681ce5b4f5ec9ab8c2c8ccd13d120 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 24 Nov 2017 16:49:42 +0100 Subject: Depsgraph: Tag background scene for base flags update When setting background object, it might pull new objects in and those objects will not have proper flags unless on_visible_update() was called afterwards. --- source/blender/makesrna/intern/rna_scene.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_scene.c') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 81e3d811122..682e0ff3404 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -683,7 +683,13 @@ void rna_Scene_set_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) Scene *scene = (Scene *)ptr->id.data; DEG_relations_tag_update(bmain); - DEG_id_tag_update(&scene->id, 0); + DEG_id_tag_update_ex(bmain, &scene->id, 0); + if (scene->set != NULL) { + /* Objects which are pulled into main scene's depsgraph needs to have + * their base flags updated. + */ + DEG_id_tag_update_ex(bmain, &scene->set->id, 0); + } } static void rna_Scene_layer_set(PointerRNA *ptr, const int *values) -- cgit v1.2.3