[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13913] trunk/blender/source/blender/src/ drawnode.c: Didnt set the image output node active before browsing the files.

Campbell Barton ideasman42 at gmail.com
Fri Feb 29 11:13:34 CET 2008


Revision: 13913
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13913
Author:   campbellbarton
Date:     2008-02-29 11:13:34 +0100 (Fri, 29 Feb 2008)

Log Message:
-----------
Didnt set the image output node active before browsing the files.

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawnode.c

Modified: trunk/blender/source/blender/src/drawnode.c
===================================================================
--- trunk/blender/source/blender/src/drawnode.c	2008-02-29 08:31:11 UTC (rev 13912)
+++ trunk/blender/source/blender/src/drawnode.c	2008-02-29 10:13:34 UTC (rev 13913)
@@ -1926,10 +1926,19 @@
 	str += sprintf(str, "OpenEXR %%x%d", R_OPENEXR);
 }
 
+static void node_set_image_cb(void *ntree_v, void *node_v)
+{
+	bNodeTree *ntree= ntree_v;
+	bNode *node= node_v;
+	
+	nodeSetActive(ntree, node);
+}
+
 static int node_composit_buts_file_output(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
 {
 	if(block) {
 		NodeImageFile *nif= node->storage;
+		uiBut *bt;
 		short x= (short)butr->xmin;
 		short y= (short)butr->ymin;
 		short w= (short)butr->xmax-butr->xmin;
@@ -1939,9 +1948,10 @@
 		
 		uiBlockBeginAlign(block);
 		
-		uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL,
+		bt = uiDefIconBut(block, BUT, B_NODE_SETIMAGE, ICON_FILESEL,
 				  x, y+60, 20, 20,
 				  0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
+		uiButSetFunc(bt, node_set_image_cb, ntree, node);
 		
 		uiDefBut(block, TEX, B_NOP, "",
 				  20+x, y+60, w-20, 20, 





More information about the Bf-blender-cvs mailing list