diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-05 00:35:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-05 00:35:50 +0400 |
commit | 842bb449c57fc95d7590574cc5d15753459bffe4 (patch) | |
tree | 8ea0722c505073b031c30705f7e19fd84ffbe072 /source/blender/makesdna | |
parent | c355aa06a8d4a921c29188081735b29722009416 (diff) |
huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...
still a lot of work needed, will all be in next week i hope!
(warn: 2 new c files! butspace.c and buttons_scene.c)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 20 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 33 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
4 files changed, 44 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index f5ab3fb49fe..96bf31d9530 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -78,6 +78,19 @@ typedef struct ScrEdge { typedef unsigned short dna_ushort_fix; #endif + +/* panel->flag */ +#define PNL_SELECT 1 +#define PNL_CLOSED 2 + +typedef struct Panel { /* the part from uiBlock that needs saved in file */ + struct Panel *next, *prev; + char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */ + short ofsx, ofsy, sizex, sizey; + short flag, pad; + int pad2; +} Panel; + typedef struct ScrArea { struct ScrArea *next, *prev; ScrVert *v1, *v2, *v3, *v4; @@ -97,16 +110,17 @@ typedef struct ScrArea { ListBase spacedata; ListBase uiblocks; + ListBase panels; } ScrArea; #define MAXWIN 128 /* If you change EDGEWIDTH, also do the global arrat edcol[] */ -#define EDGEWIDTH 5 -#define EDGEWIDTH2 (2) +#define EDGEWIDTH 1 +#define EDGEWIDTH2 0 #define AREAGRID 4 #define AREAMINX 32 -#define HEADERY 21 +#define HEADERY 24 #define AREAMINY (HEADERY+EDGEWIDTH) #define HEADERDOWN 1 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index a3b2e857417..3cc07cb1bda 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -93,7 +93,7 @@ typedef struct SpaceButs { struct ScrArea *area; short cursens, curact; - int pad2; + short align, pad2; /* align for panels */ View2D v2d; short mainb, menunr; /* texnr and menunr have to remain shorts */ @@ -110,12 +110,8 @@ typedef struct SpaceButs { short scriptblock; short scaflag; - char texact, pad3[7]; - - /* a hackish link the anim buts keep - * to a SpaceIpo. - */ - struct SpaceIpo *anim_linked_sipo; + char texact, tab[7]; /* storing tabs for each context */ + } SpaceButs; typedef struct SpaceSeq { @@ -337,7 +333,7 @@ typedef struct SpaceImaSel { #define V3D_LOCAL 2 */ -/* buts->mainb */ +/* buts->mainb old */ #define BUTS_VIEW 0 #define BUTS_LAMP 1 #define BUTS_MAT 2 @@ -353,6 +349,27 @@ typedef struct SpaceImaSel { #define BUTS_SOUND 12 #define BUTS_CONSTRAINT 13 +/* warning: the values of these defines are used in sbuts->tabs[7] */ +/* buts->mainb new */ +#define CONTEXT_SCENE 0 +#define CONTEXT_OBJECT 1 +#define CONTEXT_TYPES 2 +#define CONTEXT_SHADING 3 +#define CONTEXT_EDITING 4 +#define CONTEXT_SCRIPT 5 +#define CONTEXT_LOGIC 6 + +/* buts->tab new */ +#define TAB_SCENE_RENDER 0 +#define TAB_SCENE_WORLD 1 +#define TAB_SCENE_SETTINGS 2 + +#define TAB_SHADING_MAT 0 +#define TAB_SHADING_TEX 1 +#define TAB_SHADING_RAD 2 +#define TAB_SHADING_WORLD 3 +#define TAB_SHADING_LAMP 4 + /* buts->scaflag */ #define BUTS_SENS_SEL 1 #define BUTS_SENS_ACT 2 diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index da5c8736a08..8f1956a36b8 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -97,6 +97,7 @@ typedef struct View3D { short mxo, myo; short gridlines, viewbut; + short modeselect, pad4, pad5, pad6; int pad2, pad3; } View3D; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 4ff94472df2..a38b89dfbcf 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1041,7 +1041,7 @@ int make_structDNA(FILE *file) void make_bad_file(char *file) { FILE *fp= fopen(file, "w"); - fprintf(fp, "NO NO NO! YOUR STUPID STUPID STUPID!\n"); + fprintf(fp, "ERROR! Cannot make correct DNA.c file\n"); fclose(fp); } |