Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/include/BIF_interface.h3
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/src/buttons_scene.c56
-rw-r--r--source/blender/src/buttons_shading.c128
-rw-r--r--source/blender/src/drawview.c20
-rw-r--r--source/blender/src/interface.c174
-rw-r--r--source/blender/src/interface_draw.c40
-rw-r--r--source/blender/src/language.c4
-rw-r--r--source/blender/src/space.c2
9 files changed, 286 insertions, 143 deletions
diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h
index 3340aec5c4a..e2a2517f144 100644
--- a/source/blender/include/BIF_interface.h
+++ b/source/blender/include/BIF_interface.h
@@ -175,7 +175,8 @@ void uiFreeBlocksWin(struct ListBase *lb, int win);
uiBlock *uiNewBlock(struct ListBase *lb, char *name, short dt, short font, short win);
uiBlock *uiGetBlock(char *name, struct ScrArea *sa);
-void uiBlockBeginAlign(uiBlock *block, char dir);
+/* automatic aligning, horiz or verical */
+void uiBlockBeginAlign(uiBlock *block);
void uiBlockEndAlign(uiBlock *block);
uiBut *uiDefBut(uiBlock *block,
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 412bac6843c..73fb82b4901 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -138,7 +138,7 @@ typedef struct UserDef {
short encoding;
short transopts;
short menuthreshold1, menuthreshold2;
- char fontname[64];
+ char fontname[256]; // FILE_MAXDIR+FILE length
struct ListBase themes;
short undosteps, pad0;
short tb_leftmouse, tb_rightmouse;
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 02133c5ffe2..ed3c22ab860 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -954,14 +954,13 @@ static void render_panel_output()
block= uiNewBlock(&curarea->uiblocks, "render_panel_output", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Output", "Render", 0, 0, 318, 204)==0) return;
- uiBlockBeginAlign(block, 'v');
- uiDefBut(block, TEX,0,"", 30, 170, 268, 19,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
- uiDefBut(block, TEX,0,"", 30, 148, 268, 19,G.scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering");
- uiDefBut(block, TEX,0,"", 30, 125, 268, 19,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefIconBut(block, BUT, B_FS_PIC, ICON_FILESEL, 8, 170, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Pics dir/name");
+ uiDefBut(block, TEX,0,"", 30, 170, 268, 19,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
uiDefIconBut(block, BUT,B_FS_BACKBUF, ICON_FILESEL, 8, 148, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
+ uiDefBut(block, TEX,0,"", 30, 148, 268, 19,G.scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering");
uiDefIconBut(block, BUT,B_FS_FTYPE, ICON_FILESEL, 8, 125, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
+ uiDefBut(block, TEX,0,"", 30, 125, 268, 19,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
uiBlockEndAlign(block);
uiDefIconBut(block, BUT, B_CLEARSET, ICON_X, 131, 95, 20, 19, 0, 0, 0, 0, 0, "Remove Set link");
@@ -985,12 +984,13 @@ static void render_panel_output()
uiDefButS(block, TOG|BIT|0, 0,"Backbuf", 8, 70, 62, 19, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");
uiBlockSetCol(block, TH_AUTO);
-
- for(b=0; b<3; b++)
+
+ uiBlockBeginAlign(block);
+ for(b=2; b>=0; b--)
for(a=0; a<3; a++)
uiDefButS(block, TOG|BIT|(3*b+a), 800,"", (short)(9+18*a),(short)(7+12*b),16,10, &R.winpos, 0, 0, 0, 0, "Render window placement on screen");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_REDR, "DispView", 72, 7, 65, 19, &R.displaymode, 0.0, (float)R_DISPLAYVIEW, 0, 0, "Sets render output to display in 3D view");
uiDefButS(block, ROW, B_REDR, "DispWin", 139, 7, 62, 19, &R.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output to display in a seperate window");
uiBlockEndAlign(block);
@@ -1022,40 +1022,41 @@ static void render_panel_render()
uiDefBut(block, BUT,B_DORENDER,"RENDER", 369,142,192,47, 0, 0, 0, 0, 0, "Start the rendering");
- uiDefButS(block, TOG|BIT|0, 0, "OSA", 369,114,124,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
- uiDefButF(block, NUM,B_DIFF,"Bf:", 495,90,65,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 0, "Sets motion blur factor");
+ uiBlockBeginAlign(block);
+ uiDefButS(block, TOG|BIT|0, 0, "OSA", 369,114,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
+ uiDefButS(block, ROW,B_DIFF,"5", 369,90,28,20,&G.scene->r.osa,2.0,5.0, 0, 0, "Sets oversample level to 5");
+ uiDefButS(block, ROW,B_DIFF,"8", 397,90,28,20,&G.scene->r.osa,2.0,8.0, 0, 0, "Sets oversample level to 8 (Recommended)");
+ uiDefButS(block, ROW,B_DIFF,"11", 425,90,33,20,&G.scene->r.osa,2.0,11.0, 0, 0, "Sets oversample level to 11");
+ uiDefButS(block, ROW,B_DIFF,"16", 458,90,33,20,&G.scene->r.osa,2.0,16.0, 0, 0, "Sets oversample level to 16");
+
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|14, 0, "MBLUR", 495,114,66,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
+ uiDefButF(block, NUM,B_DIFF,"Bf:", 495,90,65,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 0, "Sets motion blur factor");
- uiBlockBeginAlign(block, 'h');
- uiDefButS(block, ROW,B_DIFF,"5", 369,90,29,20,&G.scene->r.osa,2.0,5.0, 0, 0, "Sets oversample level to 5");
- uiDefButS(block, ROW,B_DIFF,"8", 400,90,29,20,&G.scene->r.osa,2.0,8.0, 0, 0, "Sets oversample level to 8 (Recommended)");
- uiDefButS(block, ROW,B_DIFF,"11", 431,90,33,20,&G.scene->r.osa,2.0,11.0, 0, 0, "Sets oversample level to 11");
- uiDefButS(block, ROW,B_DIFF,"16", 466,90,28,20,&G.scene->r.osa,2.0,16.0, 0, 0, "Sets oversample level to 16");
-
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM,B_DIFF,"Xparts:", 369,42,99,31,&G.scene->r.xparts,1.0, 64.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)");
uiDefButS(block, NUM,B_DIFF,"Yparts:", 472,42,86,31,&G.scene->r.yparts,1.0, 64.0, 0, 0, "Sets the number of vertical parts to render image in");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW,800,"Sky", 369,11,38,24,&G.scene->r.alphamode,3.0,0.0, 0, 0, "Fill background with sky");
uiDefButS(block, ROW,800,"Premul", 410,11,54,24,&G.scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance");
uiDefButS(block, ROW,800,"Key", 467,11,44,24,&G.scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and colour values remain unchanged");
- uiBlockEndAlign(block);
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1,0,"Shadow", 565,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
uiDefButS(block, TOG|BIT|4,0,"EnvMap", 626,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map renering");
uiDefButS(block, TOG|BIT|10,0,"Pano", 565,142,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
uiDefButS(block, TOG|BIT|8,0,"Radio", 626,142,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW,B_DIFF,"100%", 565,114,121,20,&G.scene->r.size,1.0,100.0, 0, 0, "Set render size to defined size");
- uiBlockBeginAlign(block, 'h');
uiDefButS(block, ROW,B_DIFF,"75%", 565,90,36,20,&G.scene->r.size,1.0,75.0, 0, 0, "Set render size to 3/4 of defined size");
uiDefButS(block, ROW,B_DIFF,"50%", 604,90,40,20,&G.scene->r.size,1.0,50.0, 0, 0, "Set render size to 1/2 of defined size");
uiDefButS(block, ROW,B_DIFF,"25%", 647,90,39,20,&G.scene->r.size,1.0,25.0, 0, 0, "Set render size to 1/4 of defined size");
uiBlockEndAlign(block);
uiDefButS(block, TOG|BIT|6,0,"Fields", 564,42,90,31,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|13,0,"Odd", 655,57,30,16,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
uiDefButS(block, TOG|BIT|7,0,"x", 655,42,30,15,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
uiBlockEndAlign(block);
@@ -1078,7 +1079,7 @@ static void render_panel_anim()
uiDefBut(block, BUT,B_DOANIM,"ANIM", 692,142,192,47, 0, 0, 0, 0, 0, "Start rendering a sequence");
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|0, 0, "Do Sequence", 692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
uiDefButS(block, TOG|BIT|1, 0, "Render Daemon", 692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
uiBlockEndAlign(block);
@@ -1087,7 +1088,7 @@ static void render_panel_anim()
uiDefBut(block, BUT,B_PLAYANIM, "PLAY", 692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)");
uiDefButS(block, NUM, B_RTCHANGED, "rt:", 790,40,95,33, &G.rt, -1000.0, 1000.0, 0, 0, "General testing/debug button");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 692,10,94,24, &G.scene->r.sfra,1.0,18000.0, 0, 0, "The start frame of the animation");
uiDefButS(block, NUM,REDRAWSEQ,"End:", 790,10,95,24, &G.scene->r.efra,1.0,18000.0, 0, 0, "The end frame of the animation");
uiBlockEndAlign(block);
@@ -1104,11 +1105,10 @@ static void render_panel_format()
uiDefBlockBut(block, framing_render_menu, NULL, "Game framing settings |>> ", 892, 169, 227, 20, "Display game framing settings");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM,REDRAWVIEWCAM,"SizeX:", 892 ,136,112,27, &G.scene->r.xsch, 4.0, 10000.0, 0, 0, "The image width in pixels");
- uiDefButS(block, NUM,REDRAWVIEWCAM,"AspX:", 892 ,114,112,20, &G.scene->r.xasp, 1.0,200.0, 0, 0, "The horizontal aspect ratio");
- uiBlockBeginAlign(block, 'v');
uiDefButS(block, NUM,REDRAWVIEWCAM,"SizeY:", 1007,136,112,27, &G.scene->r.ysch, 4.0,10000.0, 0, 0, "The image height in scanlines");
+ uiDefButS(block, NUM,REDRAWVIEWCAM,"AspX:", 892 ,114,112,20, &G.scene->r.xasp, 1.0,200.0, 0, 0, "The horizontal aspect ratio");
uiDefButS(block, NUM,REDRAWVIEWCAM,"AspY:", 1007,114,112,20, &G.scene->r.yasp, 1.0,200.0, 0, 0, "The vertical aspect ratio");
uiBlockEndAlign(block);
@@ -1175,12 +1175,12 @@ static void render_panel_format()
uiDefButS(block, NUM,REDRAWALL,"Frs/sec:", 1006,yofs,113,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW,B_DIFF,"BW", 892, 10,74,19, &G.scene->r.planes, 5.0,(float)R_PLANESBW, 0, 0, "Images are saved with BW (grayscale) data");
uiDefButS(block, ROW,B_DIFF,"RGB", 968, 10,74,19, &G.scene->r.planes, 5.0,(float)R_PLANES24, 0, 0, "Images are saved with RGB (color) data");
uiDefButS(block, ROW,B_DIFF,"RGBA", 1044, 10,75,19, &G.scene->r.planes, 5.0,(float)R_PLANES32, 0, 0, "Images are saved with RGB and Alpha data (if supported)");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_PR_PAL, "PAL", 1146,170,100,18, 0, 0, 0, 0, 0, "Size preset: Image size - 720x576, Aspect ratio - 54x51, 25 fps");
uiDefBut(block, BUT,B_PR_NTSC, "NTSC", 1146,150,100,18, 0, 0, 0, 0, 0, "Size preset: Image size - 720x480, Aspect ratio - 10x11, 30 fps");
uiDefBut(block, BUT,B_PR_PRESET, "Default", 1146,130,100,18, 0, 0, 0, 0, 0, "Same as PAL, with render settings (OSA, Shadows, Fields)");
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index e70004fa952..c97078704d2 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -877,12 +877,12 @@ static void texture_panel_image1(Tex *tex)
uiDefButS(block, NUM, B_TEXPRV, "StartFr:", 642,30,150,19, &tex->sfra, 1.0, 9000.0, 0, 0, "Set the start frame of the animation");
uiDefButS(block, NUM, B_TEXPRV, "Len:", 642,10,150,19, &tex->len, 0.0, 9000.0, 0, 0, "Set the length of the animation");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_TEXPRV, "Fra:", 802,70,73,19, &(tex->fradur[0][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
uiDefButS(block, NUM, B_TEXPRV, "Fra:", 802,50,73,19, &(tex->fradur[1][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
uiDefButS(block, NUM, B_TEXPRV, "Fra:", 802,30,73,19, &(tex->fradur[2][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
uiDefButS(block, NUM, B_TEXPRV, "Fra:", 802,10,73,19, &(tex->fradur[3][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_TEXPRV, "", 879,70,37,19, &(tex->fradur[0][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
uiDefButS(block, NUM, B_TEXPRV, "", 879,50,37,19, &(tex->fradur[1][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
uiDefButS(block, NUM, B_TEXPRV, "", 879,30,37,19, &(tex->fradur[2][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
@@ -904,12 +904,12 @@ static void texture_panel_image(Tex *tex)
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
/* types */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|0, 0, "InterPol", 10, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Interpolate pixels of the image");
uiDefButS(block, TOG|BIT|1, B_TEXPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Use the alpha layer");
uiDefButS(block, TOG|BIT|5, B_TEXPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Calculate an alpha based on the RGB");
uiDefButS(block, TOG|BIT|2, B_TEXPRV, "NegAlpha", 235, 180, 75, 18, &tex->flag, 0, 0, 0, 0, "Reverse the alpha value");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|2, B_IMAPTEST, "MipMap", 10, 160, 60, 18, &tex->imaflag, 0, 0, 0, 0, "Generate a series of pictures used for mipmapping");
uiDefButS(block, TOG|BIT|3, B_IMAPTEST, "Fields", 70, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Work with field images");
uiDefButS(block, TOG|BIT|4, B_TEXPRV, "Rot90", 120, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Rotate image 90 degrees when rendered");
@@ -942,18 +942,18 @@ static void texture_panel_image(Tex *tex)
/* crop extend clip */
uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,92,150,19, &tex->filtersize, 0.1, 25.0, 0, 0, "Set the filter size used by mipmap and interpol");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, 0, "Extend", 10,70,75,19, &tex->extend, 4.0, 1.0, 0, 0, "Extend the colour of the edge");
uiDefButS(block, ROW, 0, "Clip", 85,70,75,19, &tex->extend, 4.0, 2.0, 0, 0, "Return alpha 0.0 outside image");
uiDefButS(block, ROW, 0, "ClipCube", 160,70,75,19, &tex->extend, 4.0, 4.0, 0, 0, "Return alpha 0.0 outside cubeshaped area around image");
uiDefButS(block, ROW, 0, "Repeat", 235,70,75,19, &tex->extend, 4.0, 3.0, 0, 0, "Repeat image horizontally and vertically");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_TEXPRV, "Xrepeat:", 10,50,150,19, &tex->xrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the X direction");
uiDefButS(block, NUM, B_TEXPRV, "Yrepeat:", 160,50,150,19, &tex->yrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the Y direction");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_REDR, "MinX ", 10,28,150,19, &tex->cropxmin, -10.0, 10.0, 10, 0, "Set minimum X value for cropping");
uiDefButF(block, NUM, B_REDR, "MinY ", 10,8,150,19, &tex->cropymin, -10.0, 10.0, 10, 0, "Set minimum Y value for cropping");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_REDR, "MaxX ", 160,28,150,19, &tex->cropxmax, -10.0, 10.0, 10, 0, "Set maximum X value for cropping");
uiDefButF(block, NUM, B_REDR, "MaxY ", 160,8,150,19, &tex->cropymax, -10.0, 10.0, 10, 0, "Set maximum Y value for cropping");
uiBlockEndAlign(block);
@@ -993,14 +993,14 @@ static void texture_panel_colors(Tex *tex)
uiBlockSetDrawExtraFunc(block, drawcolorband_cb);
cbd= tex->coba->data + tex->coba->cur;
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_CALCCBAND, "Pos", 10,120,80,20, &cbd->pos, 0.0, 1.0, 10, 0, "Set the position of the active colour");
uiDefButS(block, ROW, B_TEXPRV, "E", 90,120,20,20, &tex->coba->ipotype, 5.0, 1.0, 0, 0, "Interpolation type Ease");
uiDefButS(block, ROW, B_TEXPRV, "L", 110,120,20,20, &tex->coba->ipotype, 5.0, 0.0, 0, 0, "Interpolation type Linear");
uiDefButS(block, ROW, B_TEXPRV, "S", 130,120,20,20, &tex->coba->ipotype, 5.0, 2.0, 0, 0, "Interpolation type Spline");
uiDefButF(block, COL, B_BANDCOL, "", 150,120,30,20, &(cbd->r), 0, 0, 0, 0, "");
uiDefButF(block, NUMSLI, B_TEXPRV, "A ", 180,120,130,20, &cbd->a, 0.0, 1.0, 0, 0, "Set the alpha value");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_TEXPRV, "R ", 10,100,100,20, &cbd->r, 0.0, 1.0, B_BANDCOL, 0, "Set the red value");
uiDefButF(block, NUMSLI, B_TEXPRV, "G ", 110,100,100,20, &cbd->g, 0.0, 1.0, B_BANDCOL, 0, "Set the green value");
uiDefButF(block, NUMSLI, B_TEXPRV, "B ", 210,100,100,20, &cbd->b, 0.0, 1.0, B_BANDCOL, 0, "Set the blue value");
@@ -1009,7 +1009,7 @@ static void texture_panel_colors(Tex *tex)
/* RGB-BRICON */
if((tex->flag & TEX_COLORBAND)==0) {
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_TEXPRV, "R ", 60,80,200,20, &tex->rfac, 0.0, 2.0, 0, 0, "Set the red value");
uiDefButF(block, NUMSLI, B_TEXPRV, "G ", 60,60,200,20, &tex->gfac, 0.0, 2.0, 0, 0, "Set the green value");
uiDefButF(block, NUMSLI, B_TEXPRV, "B ", 60,40,200,20, &tex->bfac, 0.0, 2.0, 0, 0, "Set the blue value");
@@ -1052,7 +1052,7 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
/* From button: removed */
/* CHANNELS */
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
yco= 150;
for(a= 0; a<8; a++) {
@@ -1124,7 +1124,7 @@ static void texture_panel_preview(int preview)
// label to force a boundbox for buttons not to be centered
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButC(block, ROW, B_TEXREDR_PRV, "Mat", 200,175,80,25, &G.buts->texfrom, 3.0, 0.0, 0, 0, "Display the texture of the active material");
uiDefButC(block, ROW, B_TEXREDR_PRV, "World", 200,150,80,25, &G.buts->texfrom, 3.0, 1.0, 0, 0, "Display the texture of the world block");
uiDefButC(block, ROW, B_TEXREDR_PRV, "Lamp", 200,125,80,25, &G.buts->texfrom, 3.0, 2.0, 0, 0, "Display the texture of the lamp");
@@ -1390,14 +1390,14 @@ static void world_panel_mapto(World *wrld)
}
/* TEXTURE OUTPUT */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,114,52,18, &(mtex->texflag), 0, 0, 0, 0, "Use stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,114,38,18, &(mtex->texflag), 0, 0, 0, 0, "Inverse texture operation");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,114,69,18, &(mtex->texflag), 0, 0, 0, 0, "Use RGB values for intensity texure");
uiBlockEndAlign(block);
uiDefButF(block, COL, B_MTEXCOL, "", 920,100,163,12, &(mtex->r), 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "The amount of red that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,18, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "The amount of green that blends with the intensity colour");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,18, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "The amount of blue that blends with the intensity colour");
@@ -1409,12 +1409,12 @@ static void world_panel_mapto(World *wrld)
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 1172,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the horizon");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 1087,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith above");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 1172,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith below");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,114,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,18, &(mtex->varfac), 0.0, 1.0, 0, 0, "Specify the extent to which the texture works on a value");
@@ -1436,7 +1436,7 @@ static void world_panel_texture(World *wrld)
/* TEX CHANNELS */
uiBlockSetCol(block, TH_BUT_NEUTRAL);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
for(a= 0; a<6; a++) {
mtex= wrld->mtex[a];
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
@@ -1483,11 +1483,11 @@ static void world_panel_texture(World *wrld)
uiDefButS(block, ROW, B_MATPRV, "Object", 150,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "The name of the object used as a source for texture coordinates");
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,100,19, &(mtex->object), "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "sizeX", 200,50,100,18, mtex->size, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeY", 200,30,100,18, mtex->size+1, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeZ", 200,10,100,18, mtex->size+2, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
@@ -1514,11 +1514,11 @@ static void world_panel_mistaph(World *wrld)
uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D,"Mist", 10,120,140,19, &wrld->mode, 0, 0, 0, 0, "Enable mist");
uiBlockSetCol(block, TH_AUTO);
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_DIFF, "Qua", 10, 90, 40, 19, &wrld->mistype, 1.0, 0.0, 0, 0, "Use quadratic progression");
uiDefButS(block, ROW, B_DIFF, "Lin", 50, 90, 50, 19, &wrld->mistype, 1.0, 1.0, 0, 0, "Use linear progression");
uiDefButS(block, ROW, B_DIFF, "Sqr", 100, 90, 50, 19, &wrld->mistype, 1.0, 2.0, 0, 0, "Use inverse quadratic progression");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM,REDRAWVIEW3D, "Sta:",10,70,140,19, &wrld->miststa, 0.0, 1000.0, 10, 0, "Specify the starting distance of the mist");
uiDefButF(block, NUM,REDRAWVIEW3D, "Di:",10,50,140,19, &wrld->mistdist, 0.0,1000.0, 10, 00, "Specify the depth of the mist");
uiDefButF(block, NUM,B_DIFF,"Hi:", 10,30,140,19, &wrld->misthi,0.0,100.0, 10, 0, "Specify the factor for a less dense mist with increasing height");
@@ -1529,7 +1529,7 @@ static void world_panel_mistaph(World *wrld)
uiDefButS(block, TOG|BIT|1,B_DIFF, "Stars",160,120,140,19, &wrld->mode, 0, 0, 0, 0, "Enable stars");
uiBlockSetCol(block, TH_AUTO);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM,B_DIFF,"StarDist:", 160,70,140,19, &(wrld->stardist), 2.0, 1000.0, 100, 0, "Specify the average distance between two stars");
uiDefButF(block, NUM,B_DIFF,"MinDist:", 160,50,140,19, &(wrld->starmindist), 0.0, 1000.0, 100, 0, "Specify the minimum distance to the camera");
uiDefButF(block, NUMSLI,B_DIFF,"Size:", 160,30,140,19, &(wrld->starsize), 0.0, 10.0, 10, 0, "Specify the average screen dimension");
@@ -1561,17 +1561,17 @@ static void world_panel_world(World *wrld)
uiDefButF(block, COL, B_COLHOR, "", 10,150,145,19, &wrld->horr, 0, 0, 0, 0, "");
uiDefButF(block, COL, B_COLZEN, "", 160,150,145,19, &wrld->zenr, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_MATPRV,"HoR ", 10,130,145,19, &(wrld->horr), 0.0, 1.0, B_COLHOR,0, "The amount of red of the horizon colour");
uiDefButF(block, NUMSLI,B_MATPRV,"HoG ", 10,110,145,19, &(wrld->horg), 0.0, 1.0, B_COLHOR,0, "The amount of green of the horizon colour");
uiDefButF(block, NUMSLI,B_MATPRV,"HoB ", 10,90,145,19, &(wrld->horb), 0.0, 1.0, B_COLHOR,0, "The amount of blue of the horizon colour");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_MATPRV,"ZeR ", 160,130,145,19, &(wrld->zenr), 0.0, 1.0, B_COLZEN,0, "The amount of red of the zenith colour");
uiDefButF(block, NUMSLI,B_MATPRV,"ZeG ", 160,110,145,19, &(wrld->zeng), 0.0, 1.0, B_COLZEN,0, "The amount of green of the zenith colour");
uiDefButF(block, NUMSLI,B_MATPRV,"ZeB ", 160,90,145,19, &(wrld->zenb), 0.0, 1.0, B_COLZEN,0, "The amount of blue of the zenith colour");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_MATPRV,"AmbR ", 10,50,145,19, &(wrld->ambr), 0.0, 1.0 ,0,0, "The amount of red of the ambient colour");
uiDefButF(block, NUMSLI,B_MATPRV,"AmbG ", 10,30,145,19, &(wrld->ambg), 0.0, 1.0 ,0,0, "The amount of red of the ambient colour");
uiDefButF(block, NUMSLI,B_MATPRV,"AmbB ", 10,10,145,19, &(wrld->ambb), 0.0, 1.0 ,0,0, "The amount of red of the ambient colour");
@@ -1599,7 +1599,7 @@ static void world_panel_preview(World *wrld)
// label to force a boundbox for buttons not to be centered
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1,B_MATPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Render background with real horizon");
uiDefButS(block, TOG|BIT|0,B_MATPRV,"Blend",200,150,80,25, &wrld->skytype, 0, 0, 0, 0, "Render background with natural progression");
uiDefButS(block, TOG|BIT|2,B_MATPRV,"Paper",200,125,80,25, &wrld->skytype, 0, 0, 0, 0, "Flatten blend or texture coordinates");
@@ -1666,14 +1666,14 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
}
/* TEXTURE OUTPUT */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 920,114,52,18, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 974,114,38,18, &(mtex->texflag), 0, 0, 0, 0, "Apply the inverse of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "RGBtoInt", 1014,114,69,18, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
uiBlockEndAlign(block);
uiDefButF(block, COL, B_MTEXCOL, "", 920,100,163,12, &(mtex->r), 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 920,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the red component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 920,60,163,18, &(mtex->g), 0.0, 1.0, B_MTEXCOL, 0, "Set the green component of the intensity texture to blend with");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 920,40,163,18, &(mtex->b), 0.0, 1.0, B_MTEXCOL, 0, "Set the blue component of the intensity texture to blend with");
@@ -1683,12 +1683,12 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
/* MAP TO */
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 1107,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the colour of the lamp");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Mix the values");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Multiply the values");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "Add the values");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,114,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "Subtract the values");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,18, &(mtex->varfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects the value");
@@ -1711,7 +1711,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
/* TEX CHANNELS */
uiBlockSetCol(block, TH_BUT_NEUTRAL);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
for(a= 0; a<6; a++) {
mtex= la->mtex[a];
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
@@ -1754,18 +1754,18 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
/* TEXCO */
uiBlockSetCol(block, TH_AUTO);
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Glob", 100,110,60,20, &(mtex->texco), 4.0, (float)TEXCO_GLOB, 0, 0, "Generate texture coordinates from global coordinates");
uiDefButS(block, ROW, B_MATPRV, "View", 160,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Generate texture coordinates from view coordinates");
uiDefButS(block, ROW, B_MATPRV, "Object", 230,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
uiBlockEndAlign(block);
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,200,20, &(mtex->object), "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "sizeX", 200,50,100,18, mtex->size, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeY", 200,30,100,18, mtex->size+1, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeZ", 200,10,100,18, mtex->size+2, -10.0, 10.0, 10, 0, "Set the extra scaling of the texture coordinate");
@@ -1792,7 +1792,7 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
uiDefButS(block, TOG|BIT|1, 0,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Render spotlights with a volumetric halo");
uiBlockSetCol(block, TH_AUTO);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_LAMPREDRAW,"SpotSi ", 100,180,200,19,&la->spotsize, 1.0, 180.0, 0, 0, "Set the angle of the spot beam in degrees");
uiDefButF(block, NUMSLI,B_MATPRV,"SpotBl ", 100,160,200,19,&la->spotblend, 0.0, 1.0, 0, 0, "Set the softness of the spot edge");
uiBlockEndAlign(block);
@@ -1801,7 +1801,7 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
uiDefButS(block, NUM,B_SBUFF,"ShadowBufferSize:", 100,110,200,19, &la->bufsize,512,5120, 0, 0, "Set the size of the shadow buffer");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM,REDRAWVIEW3D,"ClipSta:", 100,70,100,19, &la->clipsta, 0.1*grid,1000.0*grid, 10, 0, "Set the shadow map clip start");
uiDefButF(block, NUM,REDRAWVIEW3D,"ClipEnd:", 200,70,100,19,&la->clipend, 1.0, 5000.0*grid, 100, 0, "Set the shadow map clip end");
uiBlockEndAlign(block);
@@ -1851,7 +1851,7 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
uiBlockSetCol(block, TH_AUTO);
uiDefButF(block, NUMSLI,B_MATPRV,"Energy ", 120,150,180,20, &(la->energy), 0.0, 10.0, 0, 0, "Set the intensity of the light");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_MATPRV,"R ", 120,120,180,20,&la->r, 0.0, 1.0, B_COLLAMP, 0, "Set the red component of the light");
uiDefButF(block, NUMSLI,B_MATPRV,"G ", 120,100,180,20,&la->g, 0.0, 1.0, B_COLLAMP, 0, "Set the green component of the light");
uiDefButF(block, NUMSLI,B_MATPRV,"B ", 120,80,180,20,&la->b, 0.0, 1.0, B_COLLAMP, 0, "Set the blue component of the light");
@@ -1859,7 +1859,7 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
uiDefButF(block, COL, B_COLLAMP, "", 120,52,180,24, &la->r, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI,B_MATPRV,"Quad1 ", 120,30,180,19,&la->att1, 0.0, 1.0, 0, 0, "Set the light intensity value 1 for a quad lamp");
uiDefButF(block, NUMSLI,B_MATPRV,"Quad2 ", 120,10,180,19,&la->att2, 0.0, 1.0, 0, 0, "Set the light intensity value 2 for a quad lamp");
uiBlockEndAlign(block);
@@ -1880,7 +1880,7 @@ static void lamp_panel_preview(Object *ob, Lamp *la)
// label to force a boundbox for buttons not to be centered
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW,B_LAMPREDRAW,"Lamp", 200,175,80,25,&la->type,1.0,(float)LA_LOCAL, 0, 0, "Use a point light source");
uiDefButS(block, ROW,B_LAMPREDRAW,"Spot", 200,150,80,25,&la->type,1.0,(float)LA_SPOT, 0, 0, "Restrict lamp to conical space");
uiDefButS(block, ROW,B_LAMPREDRAW,"Sun", 200,125,80,25,&la->type,1.0,(float)LA_SUN, 0, 0, "Light shines from constant direction");
@@ -1978,7 +1978,7 @@ static void material_panel_map_to(Material *ma)
}
/* TEXTURE OUTPUT */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 900,116,54,18, &(mtex->texflag), 0, 0, 0, 0, "Set the mapping to stencil mode");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 956,116,39,18, &(mtex->texflag), 0, 0, 0, 0, "Reverse the effect of the texture");
uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 997,116,71,18, &(mtex->texflag), 0, 0, 0, 0, "Use an RGB texture as an intensity texture");
@@ -1986,7 +1986,7 @@ static void material_panel_map_to(Material *ma)
uiDefButF(block, COL, B_MTEXCOL, "", 900,100,168,12, &(mtex->r), 0, 0, 0, 0, "Browse datablocks");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
if(ma->colormodel==MA_HSV) {
uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 900,80,168,18, &(mtex->r), 0.0, 0.9999, B_MTEXCOL, 0, "");
@@ -2004,24 +2004,24 @@ static void material_panel_map_to(Material *ma)
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 900,10,168,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with the current value");
/* MAP TO */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 900,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect basic colour of the material");
uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 952,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the rendered normal");
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 1004,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the specularity colour");
uiDefButS(block, TOG|BIT|3, B_MATPRV, "Cmir", 1056,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affext the mirror colour");
uiDefButS(block, TOG3|BIT|4, B_MATPRV, "Ref", 1108,186,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of the materials reflectivity");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, TOG3|BIT|5, B_MATPRV, "Spec", 900,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the value of specularity");
uiDefButS(block, TOG3|BIT|8, B_MATPRV, "Hard", 952,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the hardness value");
uiDefButS(block, TOG3|BIT|7, B_MATPRV, "Alpha", 1004,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the alpha value");
uiDefButS(block, TOG3|BIT|6, B_MATPRV, "Emit", 1056,166,50,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the emit value");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,94,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,94,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,94,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values or colour");
uiDefButS(block, ROW, B_MATPRV, "Sub", 1226,94,40,18, &(mtex->blendtype), 9.0, (float)MTEX_SUB, 0, 0, "The texture subtracts the values or colour");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,50,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects colour");
uiDefButF(block, NUMSLI, B_MATPRV, "Nor ", 1087,30,179,18, &(mtex->norfac), 0.0, 5.0, 0, 0, "Set the amount the texture affects the normal");
uiDefButF(block, NUMSLI, B_MATPRV, "Var ", 1087,10,179,18, &(mtex->varfac), 0.0, 1.0, 0, 0, "Set the amount the texture affects a value");
@@ -2047,12 +2047,12 @@ static void material_panel_map_input(Material *ma)
}
/* TEXCO */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "UV", 630,166,40,18, &(mtex->texco), 4.0, (float)TEXCO_UV, 0, 0, "Use UV coordinates for texture coordinates");
uiDefButS(block, ROW, B_MATPRV, "Object", 670,166,75,18, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "",745,166,163,18, &(mtex->object), "");
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_MATPRV, "Glob", 630,146,45,18, &(mtex->texco), 4.0, (float)TEXCO_GLOB, 0, 0, "Use global coordinates for the texture coordinates");
uiDefButS(block, ROW, B_MATPRV, "Orco", 675,146,50,18, &(mtex->texco), 4.0, (float)TEXCO_ORCO, 0, 0, "Use the original coordinates of the mesh");
uiDefButS(block, ROW, B_MATPRV, "Stick", 725,146,50,18, &(mtex->texco), 4.0, (float)TEXCO_STICKY, 0, 0, "Use mesh sticky coordaintes for the texture coordinates");
@@ -2073,7 +2073,7 @@ static void material_panel_map_input(Material *ma)
else if(a==2) strcpy(str, "Y");
else strcpy(str, "Z");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButC(block, ROW, B_MATPRV, str, xco, 50, 24, 18, &(mtex->projx), 6.0, (float)a, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, str, xco, 30, 24, 18, &(mtex->projy), 7.0, (float)a, 0, 0, "");
uiDefButC(block, ROW, B_MATPRV, str, xco, 10, 24, 18, &(mtex->projz), 8.0, (float)a, 0, 0, "");
@@ -2081,11 +2081,11 @@ static void material_panel_map_input(Material *ma)
xco+= 26;
}
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "ofsX", 778,114,130,18, mtex->ofs, -10.0, 10.0, 10, 0, "Fine tune X coordinate");
uiDefButF(block, NUM, B_MATPRV, "ofsY", 778,94,130,18, mtex->ofs+1, -10.0, 10.0, 10, 0, "Fine tune Y coordinate");
uiDefButF(block, NUM, B_MATPRV, "ofsZ", 778,74,130,18, mtex->ofs+2, -10.0, 10.0, 10, 0, "Fine tune Z coordinate");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MATPRV, "sizeX", 778,50,130,18, mtex->size, -100.0, 100.0, 10, 0, "Set an extra scaling for the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeY", 778,30,130,18, mtex->size+1, -100.0, 100.0, 10, 0, "Set an extra scaling for the texture coordinate");
uiDefButF(block, NUM, B_MATPRV, "sizeZ", 778,10,130,18, mtex->size+2, -100.0, 100.0, 10, 0, "Set an extra scaling for the texture coordinate");
@@ -2109,7 +2109,7 @@ static void material_panel_texture(Material *ma)
/* TEX CHANNELS */
uiBlockSetCol(block, TH_BUT_NEUTRAL);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
for(a= 0; a<8; a++) {
mtex= ma->mtex[a];
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
@@ -2202,7 +2202,7 @@ static void material_panel_shading(Material *ma)
}
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButI(block, TOG|BIT|15, B_MATPRV_DRAW, "Flare", 245,142,65,28, &(ma->mode), 0, 0, 0, 0, "Render halo as a lensflare");
uiDefButI(block, TOG|BIT|8, B_MATPRV, "Rings", 245,123,65, 18, &(ma->mode), 0, 0, 0, 0, "Render rings over basic halo");
uiDefButI(block, TOG|BIT|9, B_MATPRV, "Lines", 245,104,65, 18, &(ma->mode), 0, 0, 0, 0, "Render star shaped lines over the basic halo");
@@ -2220,7 +2220,7 @@ static void material_panel_shading(Material *ma)
/* diff shader buttons */
uiDefButS(block, MENU, B_MATPRV_DRAW, str1, 9, 155,78,19, &(ma->diff_shader), 0.0, 0.0, 0, 0, "Set a diffuse shader");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Ref ", 90,155,150,19, &(ma->ref), 0.0, 1.0, 0, 0, "Set the amount of reflection");
if(ma->diff_shader==MA_DIFF_ORENNAYAR)
uiDefButF(block, NUMSLI, B_MATPRV, "Rough:",90,135, 150,19, &(ma->roughness), 0.0, 3.14, 0, 0, "Oren Nayar Roughness");
@@ -2233,7 +2233,7 @@ static void material_panel_shading(Material *ma)
/* spec shader buttons */
uiDefButS(block, MENU, B_MATPRV_DRAW, str2, 9,95,77,19, &(ma->spec_shader), 0.0, 0.0, 0, 0, "Set a specular shader");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Spec ", 90,95,150,19, &(ma->spec), 0.0, 2.0, 0, 0, "Set the degree of specularity");
if ELEM3(ma->spec_shader, MA_SPEC_COOKTORR, MA_SPEC_PHONG, MA_SPEC_BLINN) {
uiDefButS(block, NUMSLI, B_MATPRV, "Hard:", 90, 75, 150,19, &(ma->har), 1.0, 255, 0, 0, "Set the hardness of the specularity");
@@ -2253,7 +2253,7 @@ static void material_panel_shading(Material *ma)
uiDefButF(block, NUM, 0, "Zoffs:", 133,10,110,19, &(ma->zoffs), 0.0, 10.0, 0, 0, "Give face an artificial offset");
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButI(block, TOG|BIT|0, 0, "Traceable", 245,161,65,18, &(ma->mode), 0, 0, 0, 0, "Make material visible for shadow lamps");
uiDefButI(block, TOG|BIT|1, 0, "Shadow", 245,142,65,18, &(ma->mode), 0, 0, 0, 0, "Enable material for shadows");
uiDefButI(block, TOG|BIT|16, 0, "Radio", 245,123,65,18, &(ma->mode), 0, 0, 0, 0, "Enable radiosty render");
@@ -2294,7 +2294,7 @@ static void material_panel_material(Object *ob, Material *ma)
if(ob->actcol==0) ob->actcol= 1; /* because of TOG|BIT button */
/* indicate which one is linking a material */
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiSetButLock(id->lib!=0, "Can't edit library data");
strncpy(str, id->name, 2);
@@ -2326,7 +2326,7 @@ static void material_panel_material(Object *ob, Material *ma)
if(ma==0) return;
if(ma->dynamode & MA_DRAW_DYNABUTS) {
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, 0, "Restitut ", 128,120,175,20, &ma->reflect, 0.0, 1.0, 0, 0, "Elasticity of collisions");
uiDefButF(block, NUMSLI, 0, "Friction ", 128,98 ,175,20, &ma->friction, 0.0, 100.0, 0, 0, "Coulomb friction coefficient");
uiDefButF(block, NUMSLI, 0, "Fh Force ", 128,76 ,175,20, &ma->fh, 0.0, 1.0, 0, 0, "Upward spring force within the Fh area");
@@ -2337,7 +2337,7 @@ static void material_panel_material(Object *ob, Material *ma)
}
else {
if(!(ma->mode & MA_HALO)) {
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
uiDefButI(block, TOG|BIT|4, B_REDR, "VCol Light", 8,146,75,20, &(ma->mode), 0, 0, 0, 0, "Add vertex colours as extra light");
uiDefButI(block, TOG|BIT|7, B_REDR, "VCol Paint", 85,146,72,20, &(ma->mode), 0, 0, 0, 0, "Replace basic colours with vertex colours");
@@ -2350,7 +2350,7 @@ static void material_panel_material(Object *ob, Material *ma)
uiDefButF(block, COL, B_SPECCOL, "", 8,88,72,24, &(ma->specr), 0, 0, 0, 0, "");
uiDefButF(block, COL, B_MIRCOL, "", 8,61,72,24, &(ma->mirr), 0, 0, 0, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
if(ma->mode & MA_HALO) {
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Halo", 83,115,40,25, &(ma->rgbsel), 2.0, 0.0, 0, 0, "Mix the colour of the halo with the RGB sliders");
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Line", 83,88,40,25, &(ma->rgbsel), 2.0, 1.0, 0, 0, "Mix the colour of the lines with the RGB sliders");
@@ -2369,24 +2369,24 @@ static void material_panel_material(Object *ob, Material *ma)
if(ma->rgbsel==0 && (ma->mode & (MA_VERTEXCOLP|MA_FACETEXTURE) && !(ma->mode & MA_HALO)));
else if(ma->colormodel==MA_HSV) {
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 128,120,175,19, colpoin, 0.0, 0.9999, rgbsel, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 128,100,175,19, colpoin, 0.0001, 1.0, rgbsel, 0, "");
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 128,80,175,19, colpoin, 0.0001, 1.0, rgbsel, 0, "");
uiBlockSetCol(block, TH_AUTO);
}
else {
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 128,120,175,19, colpoin, 0.0, 1.0, rgbsel, 0, "");
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 128,100,175,19, colpoin+1, 0.0, 1.0, rgbsel, 0, "");
uiDefButF(block, NUMSLI, B_MATPRV, "B ", 128,80,175,19, colpoin+2, 0.0, 1.0, rgbsel, 0, "");
}
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "Alpha ", 128,52,175,19, &(ma->alpha), 0.0, 1.0, 0, 0, "Set the amount of coverage, to make materials transparent");
uiDefButF(block, NUMSLI, B_MATPRV, "SpecTra ", 128,32,175,19, &(ma->spectra), 0.0, 1.0, 0, 0, "Make specular areas opaque");
}
- uiBlockBeginAlign(block, 'h');
+ uiBlockBeginAlign(block);
uiDefButS(block, ROW, REDRAWBUTSSHADING, "RGB", 8,32,35,20, &(ma->colormodel), 1.0, (float)MA_RGB, 0, 0, "Create colour by red, green and blue");
uiDefButS(block, ROW, REDRAWBUTSSHADING, "HSV", 43,32,35,20, &(ma->colormodel), 1.0, (float)MA_HSV, 0, 0, "Mix colour with hue, saturation and value");
uiDefButS(block, TOG|BIT|0, REDRAWBUTSSHADING, "DYN", 78,32,45,20, &(ma->dynamode), 0.0, 0.0, 0, 0, "Adjust parameters for dynamics options");
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index cfbac64bf5a..8bad0b262ef 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -1072,7 +1072,7 @@ static void v3d_editvertex_buts(uiBlock *block, Object *ob, float lim)
ve_median_tot= tot;
VECCOPY(ve_median, median);
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
if(ve_median_tot==1) {
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex X:", 10, 140, 300, 19, &(ve_median[0]), -lim, lim, 10, 0, "");
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex Y:", 10, 120, 300, 19, &(ve_median[1]), -lim, lim, 10, 0, "");
@@ -1161,17 +1161,17 @@ static void v3d_posearmature_buts(uiBlock *block, Object *ob, float lim)
if (!bone)
return;
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatX:", 10, 120, 140, 19, bone->quat, -100.0, 100.0, 10, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatZ:", 10, 100, 140, 19, bone->quat+2, -100.0, 100.0, 10, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatY:", 160, 120, 140, 19, bone->quat+1, -100.0, 100.0, 10, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "QuatW:", 160, 100, 140, 19, bone->quat+3, -100.0, 100.0, 10, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocX:", 10, 70, 140, 19, bone->loc, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocY:", 10, 50, 140, 19, bone->loc+1, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "locZ:", 10, 30, 140, 19, bone->loc+2, -lim, lim, 100, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeX:", 160, 70, 140, 19, bone->size, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeZ:", 160, 50, 140, 19, bone->size+1, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL2, "SizeZ:", 160, 30, 140, 19, bone->size+2, -lim, lim, 100, 0, "");
@@ -1191,11 +1191,11 @@ static void v3d_editarmature_buts(uiBlock *block, Object *ob, float lim)
if (!ebone)
return;
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL1, "RootX:", 10, 70, 140, 19, ebone->head, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL1, "RootY:", 10, 50, 140, 19, ebone->head+1, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL1, "RootZ:", 10, 30, 140, 19, ebone->head+2, -lim, lim, 100, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL1, "TipX:", 160, 70, 140, 19, ebone->tail, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL1, "TipY:", 160, 50, 140, 19, ebone->tail+1, -lim, lim, 100, 0, "");
uiDefButF(block, NUM, B_ARMATUREPANEL1, "TipZ:", 160, 30, 140, 19, ebone->tail+2, -lim, lim, 100, 0, "");
@@ -1366,7 +1366,7 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
v3d_posearmature_buts(block, ob, lim);
}
else {
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, REDRAWVIEW3D, "LocX:", 10, 140, 140, 19, &(ob->loc[0]), -lim, lim, 100, 0, "");
uiDefButF(block, NUM, REDRAWVIEW3D, "LocY:", 10, 120, 140, 19, &(ob->loc[1]), -lim, lim, 100, 0, "");
uiDefButF(block, NUM, REDRAWVIEW3D, "LocZ:", 10, 100, 140, 19, &(ob->loc[2]), -lim, lim, 100, 0, "");
@@ -1375,11 +1375,11 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
ob_eul[1]= 180.0*ob->rot[1]/M_PI;
ob_eul[2]= 180.0*ob->rot[2]/M_PI;
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_OBJECTPANELROT, "RotX:", 10, 70, 140, 19, &(ob_eul[0]), -lim, lim, 1000, 0, "");
uiDefButF(block, NUM, B_OBJECTPANELROT, "RotY:", 10, 50, 140, 19, &(ob_eul[1]), -lim, lim, 1000, 0, "");
uiDefButF(block, NUM, B_OBJECTPANELROT, "RotZ:", 10, 30, 140, 19, &(ob_eul[2]), -lim, lim, 1000, 0, "");
- uiBlockBeginAlign(block, 'v');
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, REDRAWVIEW3D, "SizeX:", 160, 70, 140, 19, &(ob->size[0]), -lim, lim, 100, 0, "");
uiDefButF(block, NUM, REDRAWVIEW3D, "SizeY:", 160, 50, 140, 19, &(ob->size[1]), -lim, lim, 100, 0, "");
uiDefButF(block, NUM, REDRAWVIEW3D, "SizeZ:", 160, 30, 140, 19, &(ob->size[2]), -lim, lim, 100, 0, "");
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index afebf6fcdf5..8ebdb868aaf 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -3460,28 +3460,167 @@ static int ui_auto_themecol(uiBut *but)
}
}
-void uiBlockBeginAlign(uiBlock *block, char dir)
+void uiBlockBeginAlign(uiBlock *block)
{
/* if other align was active, end it */
if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
- if(dir=='h') block->flag |= UI_BUT_ALIGN_RIGHT;
- else block->flag |= UI_BUT_ALIGN_DOWN;
+ block->flag |= UI_BUT_ALIGN_DOWN;
+ /* buttons declared after this call will this align flag */
+}
+
+static int buts_are_horiz(uiBut *but1, uiBut *but2)
+{
+ float dx, dy;
+
+ dx= fabs( but1->x2 - but2->x1);
+ dy= fabs( but1->y1 - but2->y2);
- /* buttons declared after this call will get align flags updated */
+ if(dx > dy) return 0;
+ return 1;
}
void uiBlockEndAlign(uiBlock *block)
{
+ uiBut *prev, *but=NULL, *next;
+ int flag= 0, cols=0, rows=0;
+
+ if( BIF_GetThemeValue(TH_BUT_DRAWTYPE) != 2) return;
+
+ /* auto align:
+ - go back to first button of align start (ALIGN_DOWN)
+ - compare triples, and define flags
+ */
+ prev= block->buttons.last;
+ while(prev) {
+ if( (prev->flag & UI_BUT_ALIGN_DOWN)) but= prev;
+ else break;
+
+ if(but && but->next) {
+ if(buts_are_horiz(but, but->next)) cols++;
+ else rows++;
+ }
+
+ prev= prev->prev;
+ }
+ if(but==NULL) return;
+
+ /* rows==0: 1 row, cols==0: 1 collumn */
+
+ prev= NULL;
+ while(but) {
+ next= but->next;
+
+ /* clear old flag */
+ but->flag &= ~UI_BUT_ALIGN_DOWN;
+
+ if(flag==0) { /* first case */
+ if(next) {
+ if(buts_are_horiz(but, next)) {
+ if(rows==0)
+ flag= UI_BUT_ALIGN_RIGHT;
+ else
+ flag= UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT;
+ }
+ else {
+ flag= UI_BUT_ALIGN_DOWN;
+ }
+ }
+ }
+ else if(next==NULL) { /* last case */
+ if(prev) {
+ if(buts_are_horiz(prev, but)) {
+ if(rows==0)
+ flag= UI_BUT_ALIGN_LEFT;
+ else
+ flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT;
+ }
+ else flag= UI_BUT_ALIGN_TOP;
+ }
+ }
+ else if(buts_are_horiz(but, next)) {
+ /* check if this is already second row */
+ if( prev && buts_are_horiz(prev, but)==0) {
+ flag |= UI_BUT_ALIGN_TOP;
+ /* exception case: bottom row */
+ if(rows>0) {
+ uiBut *bt= but;
+ while(bt) {
+ if(bt->next && buts_are_horiz(bt, bt->next)==0 ) break;
+ bt= bt->next;
+ }
+ if(bt==0) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT;
+ }
+ }
+ else flag |= UI_BUT_ALIGN_LEFT;
+ }
+ else {
+ if(cols==0) {
+ flag |= UI_BUT_ALIGN_TOP;
+ }
+ else { /* next button switches to new row */
+ if( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */
+ flag= UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT;
+ }
+ else flag |= UI_BUT_ALIGN_TOP;
+ }
+ }
+
+ but->flag |= flag;
+
+ /* merge coordinates */
+ if(prev) {
+ // simple cases
+ if(rows==0) {
+ but->x1= (prev->x2+but->x1)/2.0;
+ prev->x2= but->x1;
+ }
+ else if(cols==0) {
+ but->y2= (prev->y1+but->y2)/2.0;
+ prev->y1= but->y2;
+ }
+ else {
+ if(buts_are_horiz(prev, but)) {
+ but->x1= (prev->x2+but->x1)/2.0;
+ prev->x2= but->x1;
+ /* copy height too */
+ but->y2= prev->y2;
+ }
+ else if(prev->prev && buts_are_horiz(prev->prev, prev)==0) {
+ /* the previous button is a single one in its row */
+ but->y2= (prev->y1+but->y2)/2.0;
+ prev->y1= but->y2;
+ }
+ else {
+ /* the previous button is not a single one in its row */
+ but->y2= prev->y1;
+ }
+ }
+ }
+
+ prev= but;
+ but= next;
+ }
+
+ block->flag &= ~UI_BUT_ALIGN; // all 4 flags
+}
+
+void uiBlockEndAligno(uiBlock *block)
+{
uiBut *but;
/* correct last defined button */
but= block->buttons.last;
if(but) {
- if(block->flag & UI_BUT_ALIGN_DOWN)
+ /* vertical align case */
+ if( (block->flag & UI_BUT_ALIGN) == (UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_DOWN) ) {
but->flag &= ~UI_BUT_ALIGN_DOWN;
- else
+ }
+ /* horizontal align case */
+ if( (block->flag & UI_BUT_ALIGN) == (UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT) ) {
but->flag &= ~UI_BUT_ALIGN_RIGHT;
+ }
+ /* else do nothing, manually provided flags */
}
block->flag &= ~UI_BUT_ALIGN; // all 4 flags
}
@@ -3574,28 +3713,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
but->flag |= UI_TEXT_LEFT;
}
- if(block->flag & UI_BUT_ALIGN) {
- but->flag |= (block->flag & UI_BUT_ALIGN);
-
- /* merge edges of buttons to same location */
- if(but->flag & UI_BUT_ALIGN_LEFT) {
- uiBut *prev= but->prev;
- if(prev) {
- but->x1=prev->x2= (but->x1+prev->x2)/2.0;
- }
- }
- else if(but->flag & UI_BUT_ALIGN_TOP) {
- uiBut *prev= but->prev;
- if(prev) {
- but->y2=prev->y1= (but->y2+prev->y1)/2.0;
- }
- }
-
- /* after first button, align is both sides */
- if(block->flag & UI_BUT_ALIGN_RIGHT) block->flag |= UI_BUT_ALIGN_LEFT;
- else if(block->flag & UI_BUT_ALIGN_DOWN) block->flag |= UI_BUT_ALIGN_TOP;
-
- }
+ but->flag |= (block->flag & UI_BUT_ALIGN);
return but;
}
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c
index fe22a1b6efa..762df51f37c 100644
--- a/source/blender/src/interface_draw.c
+++ b/source/blender/src/interface_draw.c
@@ -1289,24 +1289,44 @@ static void ui_draw_round(int type, int colorid, float asp, float x1, float y1,
}
if(align) {
- if(align==UI_BUT_ALIGN_TOP) {
+ switch(align) {
+ case UI_BUT_ALIGN_TOP:
uiSetRoundBox(12);
round_button(x1, y1, x2, y2, asp, colorid);
- }
- else if(align==UI_BUT_ALIGN_DOWN) {
+ break;
+ case UI_BUT_ALIGN_DOWN:
uiSetRoundBox(3);
round_button(x1, y1, x2, y2, asp, colorid);
- }
- else if(align==UI_BUT_ALIGN_LEFT) {
+ break;
+ case UI_BUT_ALIGN_LEFT:
uiSetRoundBox(6);
round_button(x1, y1, x2, y2, asp, colorid);
- }
- else if(align==UI_BUT_ALIGN_RIGHT) {
+ break;
+ case UI_BUT_ALIGN_RIGHT:
uiSetRoundBox(9);
round_button(x1, y1, x2, y2, asp, colorid);
- }
- else {
+ break;
+
+ case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT:
+ uiSetRoundBox(1);
+ round_button(x1, y1, x2, y2, asp, colorid);
+ break;
+ case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT:
+ uiSetRoundBox(2);
+ round_button(x1, y1, x2, y2, asp, colorid);
+ break;
+ case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT:
+ uiSetRoundBox(8);
+ round_button(x1, y1, x2, y2, asp, colorid);
+ break;
+ case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT:
+ uiSetRoundBox(4);
+ round_button(x1, y1, x2, y2, asp, colorid);
+ break;
+
+ default:
round_button_mid(x1, y1, x2, y2, asp, colorid, align);
+ break;
}
}
else {
@@ -1696,6 +1716,8 @@ void ui_set_embossfunc(uiBut *but, int drawtype)
but->embossfunc= ui_draw_minimal;
}
}
+
+ // note: if you want aligning, adapt the call uiBlockEndAlign in interface.c
}
diff --git a/source/blender/src/language.c b/source/blender/src/language.c
index a8918c3862f..183c0fd41c8 100644
--- a/source/blender/src/language.c
+++ b/source/blender/src/language.c
@@ -222,7 +222,9 @@ void start_interface_font(void) {
strcat(tstr, ".bfont.ttf");
result = FTF_SetFont(tstr, U.fontsize);
- sprintf(U.fontname, ".blender/.bfont.ttf");
+ //sprintf(U.fontname, ".blender/.bfont.ttf");
+ strncpy(U.fontname, tstr, 255);
+
#elif defined (WIN32)
BLI_getInstallationDir(tstr);
strcat(tstr, "/.blender/.bfont.ttf\0");
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 7502cd792ac..626b36d145d 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -2158,7 +2158,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
} else if(U.userpref == 2) { /* language & colors */
#ifdef INTERNATIONAL
- char curfont[64];
+ char curfont[320];
sprintf(curfont, "Interface Font: ");
strcat(curfont,U.fontname);