From ca003d0f5cfc1f2cd511f33e045eac122c8aa4da Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 23 Oct 2018 15:37:00 +0200 Subject: [PATCH] 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. --- source/blender/makesrna/intern/rna_scene.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)