Improvement for last commit, only do redraw when actually needed (in world shader...
authorThomas Dinges <blender@dingto.org>
Tue, 24 Jan 2012 20:19:26 +0000 (20:19 +0000)
committerThomas Dinges <blender@dingto.org>
Tue, 24 Jan 2012 20:19:26 +0000 (20:19 +0000)
source/blender/editors/space_node/space_node.c

index a00b1d1..493fb85 100644 (file)
@@ -169,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) {
@@ -215,7 +216,7 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                        }
                        break;
                case NC_WORLD:
-                       if(type==NTREE_SHADER) {
+                       if(type==NTREE_SHADER && shader_type==SNODE_SHADER_WORLD) {
                                ED_area_tag_refresh(sa);        
                        }
                        break;