[Bf-blender-cvs] [ca003d0f5cf] blender2.8: Fix missing relations update after allocating compositor

Sergey Sharybin noreply at git.blender.org
Tue Oct 23 15:38:15 CEST 2018


Commit: ca003d0f5cfc1f2cd511f33e045eac122c8aa4da
Author: Sergey Sharybin
Date:   Tue Oct 23 15:37:00 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBca003d0f5cfc1f2cd511f33e045eac122c8aa4da

Fix missing relations update after allocating compositor

Compositor has own node in the dependency graph, so need to make
sure relations are up to date.

This fixes wrong user counter when creating compositor nodes for
a new 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 7679ff41ba3..1d52b0011c1 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1443,9 +1443,10 @@ static char *rna_SceneRenderView_path(PointerRNA *ptr)
 static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr)
 {
 	Scene *scene = (Scene *)ptr->data;
-
-	if (scene->use_nodes && scene->nodetree == NULL)
+	if (scene->use_nodes && scene->nodetree == NULL) {
 		ED_node_composit_default(C, scene);
+	}
+	DEG_relations_tag_update(CTX_data_main(C));
 }
 
 static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)



More information about the Bf-blender-cvs mailing list