[Bf-blender-cvs] [8a1a0532503] blender2.8: Depsgraph: Tag background scene for base flags update

Sergey Sharybin noreply at git.blender.org
Fri Nov 24 17:10:39 CET 2017


Commit: 8a1a0532503681ce5b4f5ec9ab8c2c8ccd13d120
Author: Sergey Sharybin
Date:   Fri Nov 24 16:49:42 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB8a1a0532503681ce5b4f5ec9ab8c2c8ccd13d120

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.

===================================================================

M	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)



More information about the Bf-blender-cvs mailing list