[Bf-blender-cvs] [121b44698a7] blender2.8: Depsgraph: Re-build relations when changing set scene

Sergey Sharybin noreply at git.blender.org
Fri Nov 24 13:24:52 CET 2017


Commit: 121b44698a7b34206520e5468d8b1445e5c7318e
Author: Sergey Sharybin
Date:   Fri Nov 24 13:02:19 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB121b44698a7b34206520e5468d8b1445e5c7318e

Depsgraph: Re-build relations when changing set scene

Set scene is a part of dependency graph, so need to tag relations for update
after changing set scene/

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

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 cc139ec1b89..81e3d811122 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -678,6 +678,14 @@ static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
 	scene->set = set;
 }
 
+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);
+}
+
 static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
 {
 	Scene *scene = (Scene *)ptr->data;
@@ -6583,7 +6591,7 @@ void RNA_def_scene(BlenderRNA *brna)
 	RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
 	RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL);
 	RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
-	RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
+	RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
 
 	prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
 	RNA_def_property_flag(prop, PROP_EDITABLE);



More information about the Bf-blender-cvs mailing list