diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-25 14:24:28 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-25 14:24:28 +0300 |
commit | 005cb90113361356b040337bf5af503d1f4f34a0 (patch) | |
tree | 3057f65342170086e00ba3aded4d78a11fa245c1 /source/blender/makesrna/intern/rna_world.c | |
parent | 220fbddc8b64ac367f88fcf61b805de6626d717a (diff) |
Fix T52392: Node materials (Materials and World) not updated in viewport
Depsgraph was not updated after you used "Use Nodes" to create the nodetree.
Diffstat (limited to 'source/blender/makesrna/intern/rna_world.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_world.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 6c6cf24c67e..15fa686a40a 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -47,6 +47,7 @@ #include "BKE_texture.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" #include "ED_node.h" @@ -115,12 +116,15 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi static void rna_World_use_nodes_update(bContext *C, PointerRNA *ptr) { World *wrld = (World *)ptr->data; + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); if (wrld->use_nodes && wrld->nodetree == NULL) ED_node_shader_default(C, &wrld->id); - - rna_World_update(CTX_data_main(C), CTX_data_scene(C), ptr); - rna_World_draw_update(CTX_data_main(C), CTX_data_scene(C), ptr); + + DEG_relations_tag_update(bmain); + rna_World_update(bmain, scene, ptr); + rna_World_draw_update(bmain, scene, ptr); } #else |