diff options
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index fd7a6ee21fd..c2a2f319c28 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -36,11 +36,13 @@ #include "MEM_guardedalloc.h" #include "DNA_node_types.h" +#include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" #include "DNA_screen_types.h" +#include "DNA_world_types.h" #include "BLI_math.h" #include "BLI_blenlib.h" @@ -97,7 +99,13 @@ void ED_node_changed_update(ID *id, bNode *node) if(treetype==NTREE_SHADER) { DAG_id_tag_update(id, 0); - WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id); + + if(GS(id->name) == ID_MA) + WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id); + else if(GS(id->name) == ID_LA) + WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, id); + else if(GS(id->name) == ID_WO) + WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, id); } else if(treetype==NTREE_COMPOSIT) { nodeUpdate(edittree, node); |