Accidentally committed without log...
authorTon Roosendaal <ton@blender.org>
Thu, 2 Feb 2006 22:35:23 +0000 (22:35 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 2 Feb 2006 22:35:23 +0000 (22:35 +0000)
This commit removes old preview-image signals for Compositor, this was
obsolete when event-based updates were added, and was still causing
recalculations for example on loading files.

source/blender/src/drawnode.c
source/blender/src/editnode.c

index a2697aa559d0b999713b22ce278e9f504a2cbd07..9dc00c1806571c5fef0635cb1400fee7a0701367 100644 (file)
@@ -571,7 +571,7 @@ static void node_browse_image_cb(void *ntree_v, void *node_v)
 
                BLI_strncpy(node->name, node->id->name+2, 21);
 
-               addqueue(curarea->win, RENDERPREVIEW, 1);
+               NodeTagChanged(ntree, node); 
        }
        node->menunr= 0;
 }
index 19036c64d14eb2be822ea9384fcfe379fb96b629..5330531d32aca103aebe01bcbf9fcd308585a4f8 100644 (file)
@@ -189,8 +189,9 @@ static void load_node_image(char *str)      /* called from fileselect */
                free_image_buffers(ima);        /* force read again */
                ima->ok= 1;
                
-               addqueue(curarea->win, RENDERPREVIEW, 1);
-               allqueue(REDRAWNODE, 0);
+               NodeTagChanged(snode->edittree, node);
+               snode_handle_recalc(snode);
+               allqueue(REDRAWNODE, 0); 
        }
 }
 
@@ -223,6 +224,7 @@ static void composit_node_event(SpaceNode *snode, short event)
                        else strcpy(name, U.textudir);
                        
                        activate_fileselect(FILE_SPECIAL, "SELECT IMAGE", name, load_node_image);
+                       break;
                }
                case B_NODE_TREE_EXEC:
                        snode_handle_recalc(snode);
@@ -236,8 +238,8 @@ static void composit_node_event(SpaceNode *snode, short event)
                                node= snode_get_editgroup(snode);
                                if(node)
                                        NodeTagChanged(snode->nodetree, node);
+                               snode_handle_recalc(snode);
                        }
-                       snode_handle_recalc(snode);
                }                       
        }
 }
@@ -1669,8 +1671,6 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                case RENDERPREVIEW:
                        if(snode->treetype==NTREE_SHADER)
                                shader_node_previewrender(sa, snode);
-                       else if(snode->treetype==NTREE_COMPOSIT)
-                               snode_handle_recalc(snode);
                        break;
                        
                case PADPLUSKEY: