[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11162] branches/imgbrowser-elubie/source/ blender: * Enormous commit! *

Matt Ebb matt at mke3.net
Wed Jul 4 03:10:50 CEST 2007


Revision: 11162
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11162
Author:   broken
Date:     2007-07-04 03:10:49 +0200 (Wed, 04 Jul 2007)

Log Message:
-----------
* Enormous commit! *

I wanted a place to work on UI stuff in SVN, rather than just on my own machine, but didn't want to create yet another separate branch. Elubie's great image browser work is of a pretty similar nature, and after discussing it with her, she agreed to let me commit to her branch, using it as a general 'UI work' branch. 

So here comes the first of it. I hope this compiles properly, it may need a clean build. There's a bunch of things in here, at differing levels of WIP-ness, including:

* New improved UI controls (ex-tuhopuu round shaded theme)
* Beginnings of new buttons organisation porting/refresh
* Python driven presets system, currently used for render dimension settings
* Radial menus (same as the old patch, but still works great. probably will need lots of work post-events refactor)
* Better default theme with consistent selection colours etc
* New icons (courtesy of jendrzych)

Modified Paths:
--------------
    branches/imgbrowser-elubie/source/blender/blenkernel/intern/object.c
    branches/imgbrowser-elubie/source/blender/include/BIF_butspace.h
    branches/imgbrowser-elubie/source/blender/include/BIF_interface.h
    branches/imgbrowser-elubie/source/blender/include/BIF_mywindow.h
    branches/imgbrowser-elubie/source/blender/include/BIF_resources.h
    branches/imgbrowser-elubie/source/blender/include/butspace.h
    branches/imgbrowser-elubie/source/blender/include/interface.h
    branches/imgbrowser-elubie/source/blender/makesdna/DNA_userdef_types.h
    branches/imgbrowser-elubie/source/blender/python/BPY_menus.c
    branches/imgbrowser-elubie/source/blender/python/BPY_menus.h
    branches/imgbrowser-elubie/source/blender/python/api2_2x/doc/Theme.py
    branches/imgbrowser-elubie/source/blender/src/B.blend.c
    branches/imgbrowser-elubie/source/blender/src/blenderbuttons.c
    branches/imgbrowser-elubie/source/blender/src/buttons_editing.c
    branches/imgbrowser-elubie/source/blender/src/buttons_scene.c
    branches/imgbrowser-elubie/source/blender/src/buttons_shading.c
    branches/imgbrowser-elubie/source/blender/src/drawipo.c
    branches/imgbrowser-elubie/source/blender/src/editarmature.c
    branches/imgbrowser-elubie/source/blender/src/editcurve.c
    branches/imgbrowser-elubie/source/blender/src/editmesh_add.c
    branches/imgbrowser-elubie/source/blender/src/editscreen.c
    branches/imgbrowser-elubie/source/blender/src/ghostwinlay.c
    branches/imgbrowser-elubie/source/blender/src/header_info.c
    branches/imgbrowser-elubie/source/blender/src/interface.c
    branches/imgbrowser-elubie/source/blender/src/interface_draw.c
    branches/imgbrowser-elubie/source/blender/src/interface_panel.c
    branches/imgbrowser-elubie/source/blender/src/resources.c
    branches/imgbrowser-elubie/source/blender/src/space.c
    branches/imgbrowser-elubie/source/blender/src/toolbox.c
    branches/imgbrowser-elubie/source/blender/src/usiblender.c
    branches/imgbrowser-elubie/source/blender/src/winlay.h

Modified: branches/imgbrowser-elubie/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/imgbrowser-elubie/source/blender/blenkernel/intern/object.c	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/blenkernel/intern/object.c	2007-07-04 01:10:49 UTC (rev 11162)
@@ -853,13 +853,15 @@
 		VECCOPY(ob->loc, G.scene->cursor);
 	}
 
-	v3d->viewquat[0]= -v3d->viewquat[0];
-	if (ob->transflag & OB_QUAT) {
-		QUATCOPY(ob->quat, v3d->viewquat);
-	} else {
-		QuatToEul(v3d->viewquat, ob->rot);
+	if (U.flag & USER_ADDOB_ALIGN_EDIT) {
+		v3d->viewquat[0]= -v3d->viewquat[0];
+		if (ob->transflag & OB_QUAT) {
+			QUATCOPY(ob->quat, v3d->viewquat);
+		} else {
+			QuatToEul(v3d->viewquat, ob->rot);
+		}
+		v3d->viewquat[0]= -v3d->viewquat[0];
 	}
-	v3d->viewquat[0]= -v3d->viewquat[0];
 }
 
 SoftBody *copy_softbody(SoftBody *sb)

Modified: branches/imgbrowser-elubie/source/blender/include/BIF_butspace.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/BIF_butspace.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/BIF_butspace.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -102,6 +102,37 @@
 #define BUTS_ACT_LINK		256
 
 
+/* buttons grid */
+#define PANELX		320
+#define PANELY		0
+#define PANELW		318
+#define PANELH		204
 
+#define BUTW1		300
+#define BUTW2		145
+#define BUTW3		93
+#define BUTW4		67
+#define ICONBUTW	20
+#define BUTH		22
+
+#define YSPACE		6
+#define XSPACE		10
+#define PANEL_YMAX	210
+#define PANEL_XMAX	310
+
+#define X1CLM		10
+
+#define X2CLM1		X1CLM
+#define X2CLM2		165
+
+#define X3CLM1		X1CLM
+#define X3CLM2		113
+#define X3CLM3		217
+
+#define X4CLM1		X1CLM
+#define X4CLM2		77
+#define X4CLM3		165
+#define X4CLM4		232
+
 #endif
 

Modified: branches/imgbrowser-elubie/source/blender/include/BIF_interface.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/BIF_interface.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/BIF_interface.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -44,6 +44,7 @@
 #define UI_EMBOSSM		2	/* Minimal builtin emboss, also for logic buttons */
 #define UI_EMBOSSP		3	/* Pulldown */
 #define UI_EMBOSSR		4	/* Rounded */
+#define UI_EMBOSSRAD		5	/* For radial (pie) menus */
 
 #define UI_EMBOSSX		0	/* for a python file, which i can't change.... duh! */
 
@@ -79,6 +80,8 @@
 #define UI_BLOCK_NOSHADOW	64
 #define UI_BLOCK_FRONTBUFFER	128
 #define UI_BLOCK_NO_HILITE	256
+#define UI_BLOCK_RADIAL	512
+#define UI_BLOCK_TRANSPARENT	1024
 
 	/* block->flag bits 12-15 are identical to but->flag bits */
 
@@ -177,7 +180,10 @@
 void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad, int active);
 void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad);
 void uiSetRoundBox(int type);
+int uiGetRoundBox(void);
 void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad);
+void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp);
+void uiTriangleFakeAA(float x1, float y1, float x2, float y2, float x3, float y3, float asp);
 
 void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag);
 void uiTextBoundsBlock(uiBlock *block, int addval);
@@ -297,6 +303,8 @@
 extern void pupmenu_set_active(int val);
 extern short pupmenu(char *instr); 
 extern short pupmenu_col(char *instr, int maxrow);
+extern short listpupmenu(char *instr); 
+extern short radialpupmenu(char *instr); 
 
 extern void uiFreePanels(struct ListBase *lb);
 extern void uiNewPanelTabbed(char *, char *);

Modified: branches/imgbrowser-elubie/source/blender/include/BIF_mywindow.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/BIF_mywindow.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/BIF_mywindow.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -33,6 +33,10 @@
  * (obsolete) IrisGL command set 
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef BIF_MYWINDOW_H
 #define BIF_MYWINDOW_H
 
@@ -121,6 +125,8 @@
 #define R_MOUSE	4
 short get_mbut(void);
 short get_qual(void);
+short get_key(void);
+short check_key(int key);
 void getmouse(short *mval);
 
 float get_pressure(void);
@@ -143,3 +149,7 @@
 
 #endif
 
+#ifdef __cplusplus
+}
+
+#endif

Modified: branches/imgbrowser-elubie/source/blender/include/BIF_resources.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/BIF_resources.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/BIF_resources.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -268,9 +268,9 @@
 	ICON_EYEDROPPER,
 	ICON_WINDOW_WINDOW,
 	ICON_PANEL_CLOSE,
-	ICON_BLANK35,
-	ICON_BLANK36,
-	ICON_BLANK37,
+	ICON_PAINT_DRAW,
+	ICON_PAINT_SOFTEN,
+	ICON_PAINT_SMEAR,
 	ICON_BLANK38,
 	
 	ICON_BLENDER,
@@ -453,7 +453,7 @@
 	TH_MENU_HILITE,
 	TH_MENU_TEXT,
 	TH_MENU_TEXT_HI,
-	
+
 	TH_BUT_DRAWTYPE,
 	
 	TH_REDALERT,
@@ -461,7 +461,12 @@
 	
 	TH_BUT_TEXTFIELD_HI,
 	TH_ICONFILE,
-	
+
+	TH_RADMENU_ITEM,
+	TH_RADMENU_HILITE,
+	TH_RADMENU_TEXT,
+	TH_RADMENU_TEXT_HI,
+
 	TH_THEMEUI,
 // common colors among spaces
 	
@@ -530,9 +535,10 @@
 
 /* theme drawtypes */
 #define TH_MINIMAL  0
-#define TH_SHADED   1
-#define TH_ROUNDED  2
+#define TH_SHADED   4
+#define TH_ROUNDED  1
 #define TH_OLDSKOOL 3
+#define TH_ROUNDSHADED 2
 
 /* specific defines per space should have higher define values */
 

Modified: branches/imgbrowser-elubie/source/blender/include/butspace.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/butspace.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/butspace.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -338,6 +338,12 @@
 #define B_ADD_RENDERLAYER	1645
 #define B_SET_PASS			1646
 
+#define B_PRESET_RDIMENSIONS	1653
+#define B_DIMSCHANGED	1654
+#define B_SHOWBUFFER	1655
+
+#define SAVEPRESETNAME "Save Preset..."
+
 /* *********************** */
 #define B_ARMATUREBUTS		1800
 #define	B_POSE			1701

Modified: branches/imgbrowser-elubie/source/blender/include/interface.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/include/interface.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/include/interface.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -55,9 +55,9 @@
 
 /* internal panel drawing defines */
 #define PNL_GRID	4
-#define PNL_DIST	8
-#define PNL_SAFETY 	8
-#define PNL_HEADER  20
+#define PNL_DIST	5
+#define PNL_SAFETY 	6
+#define PNL_HEADER  19
 
 /* panel->flag */
 #define PNL_SELECT	1
@@ -189,8 +189,11 @@
 	int afterval, flag;
 	void *curfont;
 	
+	short menuqual;	// for radial menus to disappear when the modifier key that opened it is lifted
+	short menukey;	// same but no modifier key
+	
 	short autofill, win, winq, direction, dt;
-	short needflush, auto_open, in_use, pad;  //flush see below
+	short needflush, auto_open, in_use;  //flush see below
 	void *overdraw;
 	struct uiBlock *parent;	// nested pulldowns
 	
@@ -202,6 +205,7 @@
 	int handler;			// for panels in other windows than buttonswin... just event code
 };
 
+
 /* interface.c */
 
 extern void ui_graphics_to_window(int win, float *x, float *y);

Modified: branches/imgbrowser-elubie/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/imgbrowser-elubie/source/blender/makesdna/DNA_userdef_types.h	2007-07-03 19:13:26 UTC (rev 11161)
+++ branches/imgbrowser-elubie/source/blender/makesdna/DNA_userdef_types.h	2007-07-04 01:10:49 UTC (rev 11162)
@@ -59,6 +59,10 @@
 	char menu_hilite[4];
 	char menu_text[4];
 	char menu_text_hi[4];
+	char radmenu_item[4];
+	char radmenu_hilite[4];
+	char radmenu_text[4];
+	char radmenu_text_hi[4];
 	
 	char but_drawtype;
 	char pad[3];
@@ -189,23 +193,24 @@
 /* ***************** USERDEF ****************** */
 
 /* flag */
-#define USER_AUTOSAVE			1
-#define USER_AUTOGRABGRID		2
-#define USER_AUTOROTGRID		4
-#define USER_AUTOSIZEGRID		8
-#define USER_SCENEGLOBAL		16
-#define USER_TRACKBALL			32
-#define USER_DUPLILINK			64
-#define USER_FSCOLLUM			128
-#define USER_MAT_ON_OB			256
-#define USER_NO_CAPSLOCK		512
-#define USER_VIEWMOVE			1024
-#define USER_TOOLTIPS			2048
-#define USER_TWOBUTTONMOUSE		4096
-#define USER_NONUMPAD			8192
-#define USER_LMOUSESELECT		16384
-#define USER_FILECOMPRESS		32768
-#define USER_SAVE_PREVIEWS		65536
+#define USER_AUTOSAVE			(1 << 0)
+#define USER_AUTOGRABGRID		(1 << 1)
+#define USER_AUTOROTGRID		(1 << 2)
+#define USER_AUTOSIZEGRID		(1 << 3)
+#define USER_SCENEGLOBAL		(1 << 4)
+#define USER_TRACKBALL			(1 << 5)
+#define USER_DUPLILINK			(1 << 6)
+#define USER_FSCOLLUM			(1 << 7)
+#define USER_MAT_ON_OB		(1 << 8)
+#define USER_NO_CAPSLOCK		(1 << 9)
+#define USER_VIEWMOVE			(1 << 10)
+#define USER_TOOLTIPS			(1 << 11)
+#define USER_TWOBUTTONMOUSE	(1 << 12)
+#define USER_NONUMPAD			(1 << 13)
+#define USER_LMOUSESELECT		(1 << 14)
+#define USER_FILECOMPRESS		(1 << 15)
+#define USER_SAVE_PREVIEWS		(1 << 16)
+#define USER_ADDOB_ALIGN_EDIT	(1 << 17)
 
 /* viewzom */
 #define USER_ZOOM_CONT			0
@@ -214,26 +219,27 @@
 
 /* uiflag */
 
-#define	USER_KEYINSERTACT		1
-#define	USER_KEYINSERTOBJ		2
-#define USER_WHEELZOOMDIR		4
-#define USER_FILTERFILEEXTS		8
-#define USER_DRAWVIEWINFO		16
-#define USER_PLAINMENUS			32		// old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase
+#define	USER_KEYINSERTACT	(1 << 0)
+#define	USER_KEYINSERTOBJ	(1 << 1)
+#define USER_WHEELZOOMDIR		(1 << 2)
+#define USER_FILTERFILEEXTS		(1 << 3)
+#define USER_DRAWVIEWINFO		(1 << 4)
+#define USER_PLAINMENUS		(1 << 5)		// old EVTTOCONSOLE print ghost events, here for tuhopuu compat. --phase
 								// old flag for hide pulldown was here 
-#define USER_FLIPFULLSCREEN		128
-#define USER_ALLWINCODECS		256
-#define USER_MENUOPENAUTO		512
-#define USER_PANELPINNED		1024
-#define USER_AUTOPERSP     		2048
-#define USER_LOCKAROUND     	4096
-#define USER_GLOBALUNDO     	8192
-#define USER_ORBIT_SELECTION	16384
-#define USER_KEYINSERTAVAI		32768
-#define USER_HIDE_DOT			65536
-#define USER_SHOW_ROTVIEWICON	131072
-#define USER_SHOW_VIEWPORTNAME	262144

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list