[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21547] branches/blender2.5/blender/source /blender: 2.5 file browser

Andrea Weikert elubie at gmx.net
Sun Jul 12 10:12:23 CEST 2009


Revision: 21547
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21547
Author:   elubie
Date:     2009-07-12 10:12:22 +0200 (Sun, 12 Jul 2009)

Log Message:
-----------
2.5 file browser
* bugfix: adding back adding the region on read of old files
* tweak: buttons for increment/decrement file number now have icons and size adjusted to UI_UNIT_X/UI_UNIT_Y

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
    branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
    branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c

Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-07-12 07:37:25 UTC (rev 21546)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-07-12 08:12:22 UTC (rev 21547)
@@ -5677,6 +5677,17 @@
 				/* temporarily hide it */
 				ar->flag = RGN_FLAG_HIDDEN;
 				break;
+			case SPACE_FILE:
+				ar= MEM_callocN(sizeof(ARegion), "nodetree area for node");
+				BLI_addtail(lb, ar);
+				ar->regiontype= RGN_TYPE_CHANNELS;
+				ar->alignment= RGN_ALIGN_LEFT;
+
+				ar= MEM_callocN(sizeof(ARegion), "ui area for file");
+				BLI_addtail(lb, ar);
+				ar->regiontype= RGN_TYPE_UI;
+				ar->alignment= RGN_ALIGN_TOP;
+				break;
 #if 0
 			case SPACE_BUTS:
 				/* context UI region */

Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c	2009-07-12 07:37:25 UTC (rev 21546)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c	2009-07-12 08:12:22 UTC (rev 21547)
@@ -3480,7 +3480,7 @@
 	data= MEM_callocN(sizeof(uiHandleButtonData), "uiHandleButtonData");
 	data->window= CTX_wm_window(C);
 	data->region= ar;
-	if( ELEM3(but->type, BUT_CURVE, SEARCH_MENU, TEX) );  // XXX curve is temp
+	if( ELEM(but->type, BUT_CURVE, SEARCH_MENU) );  // XXX curve is temp
 	else data->interactive= 1;
 	
 	data->state = BUTTON_STATE_INIT;

Modified: branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c	2009-07-12 07:37:25 UTC (rev 21546)
+++ branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c	2009-07-12 08:12:22 UTC (rev 21547)
@@ -137,8 +137,8 @@
 	const short line2_y    = ar->winy - IMASEL_BUTTONS_HEIGHT - 12;
 	const short line1_y    = line2_y  + IMASEL_BUTTONS_HEIGHT/2 + 4;
 	const short input_minw = 20;
-	const short btn_h      = 21;
-	const short btn_fn_w   = 14;
+	const short btn_h      = UI_UNIT_Y;
+	const short btn_fn_w   = UI_UNIT_X;
 	const short btn_minw   = 80;
 	const short btn_margin = 20;
 	const short separator  = 4;
@@ -200,13 +200,13 @@
 	/* Filename number increment / decrement buttons. */
 	if (fnumbuttons) {
 		uiBlockBeginAlign(block);
-		but = uiDefButO(block, BUT, "FILE_OT_filenum", 0, "-",
+		but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
 		        min_x + line2_w + separator, line2_y, 
 		        btn_fn_w, btn_h, 
 		        "Decrement the filename number.");    
 		RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1); 
 	
-		but = uiDefButO(block, BUT, "FILE_OT_filenum", 0, "+", 
+		but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN, 
 		        min_x + line2_w + separator + btn_fn_w, line2_y, 
 		        btn_fn_w, btn_h, 
 		        "Increment the filename number.");    





More information about the Bf-blender-cvs mailing list