Spelling Cleanup
[blender.git] / source / blender / editors / space_node / space_node.c
index f2d5efa09577c2d8c2330ce01d5c47dbf25c7114..93d3b22e09234679f5a243014ef5f58f2ad00cb7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -171,6 +169,7 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
        /* note, ED_area_tag_refresh will re-execute compositor */
        SpaceNode *snode= sa->spacedata.first;
        int type= snode->treetype;
+       short shader_type = snode->shaderfrom;
        
        /* preview renders */
        switch(wmn->category) {
@@ -216,6 +215,11 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                                        ED_area_tag_refresh(sa);
                        }
                        break;
+               case NC_WORLD:
+                       if(type==NTREE_SHADER && shader_type==SNODE_SHADER_WORLD) {
+                               ED_area_tag_refresh(sa);        
+                       }
+                       break;
                case NC_OBJECT:
                        if(type==NTREE_SHADER) {
                                if(wmn->data==ND_OB_SHADING)
@@ -250,12 +254,10 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                case NC_IMAGE:
                        if (wmn->action == NA_EDITED) {
                                if(type==NTREE_COMPOSIT) {
-                                       Scene *scene= wmn->window->screen->scene;
-                                       
                                        /* note that nodeUpdateID is already called by BKE_image_signal() on all
                                         * scenes so really this is just to know if the images is used in the compo else
                                         * painting on images could become very slow when the compositor is open. */
-                                       if(nodeUpdateID(scene->nodetree, wmn->reference))
+                                       if(nodeUpdateID(snode->nodetree, wmn->reference))
                                                ED_area_tag_refresh(sa);
                                }
                        }
@@ -337,7 +339,7 @@ static void node_buttons_area_draw(const bContext *C, ARegion *ar)
        ED_region_panels(C, ar, 1, NULL, -1);
 }
 
-/* Initialise main area, setting handlers. */
+/* Initialize main area, setting handlers. */
 static void node_main_area_init(wmWindowManager *wm, ARegion *ar)
 {
        wmKeyMap *keymap;