diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index acb714dd732..73da82ae31f 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2390,10 +2390,12 @@ static void object_panel_fluidsim(Object *ob) ob->fluidsimSettings->bbSize[0],ob->fluidsimSettings->bbSize[1],ob->fluidsimSettings->bbSize[2], fss->maxRefine, memString); //uiDefButBitS(block, TOG, 1, REDRAWBUTSOBJECT, "Advanced>>", 0,yline, 75,objHeight, &fss->show_advancedoptions, 0, 0, 0, 0, "Show advanced domain options."); + uiBlockBeginAlign(block); uiDefButS(block, ROW, REDRAWBUTSOBJECT, "Std", 0,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 0, 20.0, 0, "Show standard domain options."); uiDefButS(block, ROW, REDRAWBUTSOBJECT, "Adv", 25,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 1, 20.0, 1, "Show advanced domain options."); uiDefButS(block, ROW, REDRAWBUTSOBJECT, "Bnd", 50,yline, 25,objHeight, &fss->show_advancedoptions, 16.0, 2, 20.0, 2, "Show domain boundary options."); - + uiBlockEndAlign(block); + uiDefBut(block, BUT, B_FLUIDSIM_BAKE, "BAKE",90, yline,210,objHeight, NULL, 0.0, 0.0, 10, 0, "Perform simulation and output and surface&preview meshes for each frame."); yline -= lineHeight; yline -= 2*separateHeight; @@ -2403,32 +2405,40 @@ static void object_panel_fluidsim(Object *ob) uiDefBut(block, LABEL, 0, memString, 200,yline,100,objHeight, NULL, 0.0, 0, 0, 0, ""); yline -= lineHeight; + uiBlockBeginAlign(block); uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Resolution:", 0, yline,150,objHeight, &fss->resolutionxyz, 1, maxRes, 10, 0, "Domain resolution in X,Y and Z direction"); uiDefButS(block, NUM, B_DIFF, "Preview-Res.:", 150, yline,150,objHeight, &fss->previewresxyz, 1, 100, 10, 0, "Resolution of the preview meshes to generate, also in X,Y and Z direction"); + uiBlockEndAlign(block); yline -= lineHeight; yline -= 1*separateHeight; + uiBlockBeginAlign(block); uiDefButF(block, NUM, B_DIFF, "Start time:", 0, yline,150,objHeight, &fss->animStart, 0.0, 100.0, 10, 0, "Simulation time of the first blender frame."); uiDefButF(block, NUM, B_DIFF, "End time:", 150, yline,150,objHeight, &fss->animEnd , 0.0, 100.0, 10, 0, "Simulation time of the last blender frame."); + uiBlockEndAlign(block); yline -= lineHeight; yline -= 2*separateHeight; if((fss->guiDisplayMode<1) || (fss->guiDisplayMode>3)){ fss->guiDisplayMode=2; } // can be changed by particle setting uiDefBut(block, LABEL, 0, "Disp.-Qual.:", 0,yline, 90,objHeight, NULL, 0.0, 0, 0, 0, ""); + uiBlockBeginAlign(block); uiDefButS(block, MENU, B_FLUIDSIM_FORCEREDRAW, "GuiDisplayMode%t|Geometry %x1|Preview %x2|Final %x3", 90,yline,105,objHeight, &fss->guiDisplayMode, 0, 0, 0, 0, "How to display the fluid mesh in the blender gui."); uiDefButS(block, MENU, B_DIFF, "RenderDisplayMode%t|Geometry %x1|Preview %x2|Final %x3", 195,yline,105,objHeight, &fss->renderDisplayMode, 0, 0, 0, 0, "How to display the fluid mesh for rendering."); + uiBlockEndAlign(block); yline -= lineHeight; yline -= 1*separateHeight; + uiBlockBeginAlign(block); uiDefIconBut(block, BUT, B_FLUIDSIM_SELDIR, ICON_FILESEL, 0, yline, 20, objHeight, 0, 0, 0, 0, 0, "Select Directory (and/or filename prefix) to store baked fluid simulation files in"); uiDefBut(block, TEX, B_FLUIDSIM_FORCEREDRAW,"", 20, yline, 280, objHeight, fss->surfdataPath, 0.0,79.0, 0, 0, "Enter Directory (and/or filename prefix) to store baked fluid simulation files in"); + uiBlockEndAlign(block); // FIXME what is the 79.0 above? } else if(fss->show_advancedoptions == 1) { // advanced options - uiBlockBeginAlign(block); uiDefBut(block, LABEL, 0, "Gravity:", 0, yline, 90,objHeight, NULL, 0.0, 0, 0, 0, ""); + uiBlockBeginAlign(block); uiDefButF(block, NUM, B_DIFF, "X:", 90, yline, 70,objHeight, &fss->gravx, -1000.1, 1000.1, 10, 0, "Gravity in X direction"); uiDefButF(block, NUM, B_DIFF, "Y:", 160, yline, 70,objHeight, &fss->gravy, -1000.1, 1000.1, 10, 0, "Gravity in Y direction"); uiDefButF(block, NUM, B_DIFF, "Z:", 230, yline, 70,objHeight, &fss->gravz, -1000.1, 1000.1, 10, 0, "Gravity in Z direction"); @@ -2437,17 +2447,18 @@ static void object_panel_fluidsim(Object *ob) yline -= 1*separateHeight; /* viscosity */ - uiBlockBeginAlign(block); + if (fss->viscosityMode==1) /*manual*/ + uiBlockBeginAlign(block); uiDefButS(block, MENU, REDRAWVIEW3D, "Viscosity%t|Manual %x1|Water %x2|Oil %x3|Honey %x4", 0,yline, 90,objHeight, &fss->viscosityMode, 0, 0, 0, 0, "Set viscosity of the fluid to a preset value, or use manual input."); if(fss->viscosityMode==1) { uiDefButF(block, NUM, B_DIFF, "Value:", 90, yline, 105,objHeight, &fss->viscosityValue, 0.0, 1.0, 10, 0, "Viscosity setting, value that is multiplied by 10 to the power of (exponent*-1)."); uiDefButS(block, NUM, B_DIFF, "Neg-Exp.:", 195, yline, 105,objHeight, &fss->viscosityExponent, 0, 10, 10, 0, "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6."); + uiBlockEndAlign(block); } else { // display preset values uiDefBut(block, LABEL, 0, fluidsimViscosityPresetString[fss->viscosityMode], 90,yline,200,objHeight, NULL, 0.0, 0, 0, 0, ""); } - uiBlockEndAlign(block); yline -= lineHeight; yline -= 1*separateHeight; @@ -2584,8 +2595,10 @@ static void object_panel_fluidsim(Object *ob) yline -= 1*separateHeight; // FSPARTICLE also select input files + uiBlockBeginAlign(block); uiDefIconBut(block, BUT, B_FLUIDSIM_SELDIR, ICON_FILESEL, 0, yline, 20, objHeight, 0, 0, 0, 0, 0, "Select fluid simulation bake directory/prefix to load particles from, same as for domain object."); uiDefBut(block, TEX, B_FLUIDSIM_FORCEREDRAW,"", 20, yline, 280, objHeight, fss->surfdataPath, 0.0,79.0, 0, 0, "Enter fluid simulation bake directory/prefix to load particles from, same as for domain object."); + uiBlockEndAlign(block); yline -= lineHeight; diff --git a/source/blender/src/buttons_script.c b/source/blender/src/buttons_script.c index a30163b4da3..422d9bcac28 100644 --- a/source/blender/src/buttons_script.c +++ b/source/blender/src/buttons_script.c @@ -277,25 +277,24 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce strcat(str, "OnLoad%x 2|"); strcat(str, "OnSave%x 8"); } - uiBlockBeginAlign(block); uiDefButS(block, MENU, 1, str, (short)sx, (short)sy, 140, 19, &script->flag[script->actscript-1], 0, 0, 0, 0, "Script links for this event"); uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", (short)(sx+140),(short)sy, 140, 19, &script->scripts[script->actscript-1], "Name of Script to link"); uiBlockEndAlign(block); } - + sprintf(str,"%d Scr:", script->totscript); uiDefButS(block, NUM, REDRAWBUTSSCRIPT, str, (short)(sx+140), (short)sy-20,60,19, &script->actscript, 1, script->totscript, 0, 0, "Total / Active Script link (LeftMouse + Drag to change)"); if (scene) { + if (script->totscript<32767) uiDefBut(block, BUT, B_SSCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link"); if (script->totscript) uiDefBut(block, BUT, B_SSCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link"); uiDefBut(block, LABEL, 0, "Scene Script link", sx,sy-20,140,20, 0, 0, 0, 0, 0, ""); - } else { if (script->totscript<32767) @@ -303,6 +302,7 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce if (script->totscript) uiDefBut(block, BUT, B_SCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link"); uiDefBut(block, LABEL, 0, "Selected Script link", sx,sy-20,140,20, 0, 0, 0, 0, 0, ""); + } } @@ -327,7 +327,7 @@ static void script_panel_scriptlink(void) uiDefBut(block, LABEL, 0, "", 160, 200,150,20, NULL, 0.0, 0.0, 0, 0, ""); if (G.f & G_DOSCRIPTLINKS) { - uiBlockBeginAlign(block); + //uiBlockBeginAlign(block); ob= OBACT; if(ob) uiDefIconButS(block, ROW, B_REDR, ICON_OBJECT, xco,175,25,20, &G.buts->scriptblock, 2.0, (float)ID_OB, 0, 0, "Displays Object script links"); @@ -343,7 +343,7 @@ static void script_panel_scriptlink(void) if(ob && ob->type==OB_LAMP) uiDefIconButS(block, ROW, B_REDR, ICON_LAMP, xco+=25,175,25,20, &G.buts->scriptblock, 2.0, (float)ID_LA, 0, 0, "Displays Lamp script links"); - uiBlockEndAlign(block); + //uiBlockEndAlign(block); if (ob && G.buts->scriptblock==ID_OB) { script= &ob->scriptlink; diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index 6763bc3e567..98911905a7b 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -797,12 +797,15 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES uiDefBut(block, LABEL, 0, "Type: Image", 10,140,150,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, ""); - + + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Convert to Premul", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha"); uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Convert to Premul", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha"); uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields"); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors"); uiDefButS(block, TOG|BIT|7, SEQ_BUT_RELOAD, "Reverse Frames", 10,30,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Reverse frame order"); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Strobe:", 10,10,150,19, &last_seq->strobe, 1.0, 30.0, 100, 0, "Only display every nth frame"); + uiBlockEndAlign(block); } else if(last_seq->type==SEQ_META) { @@ -822,7 +825,8 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES uiDefBut(block, LABEL, 0, "Type: Movie", 10,140,150,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, ""); - + + uiBlockBeginAlign(block); uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Make Premul Alpha ", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha"); uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY ", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields"); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors"); @@ -830,14 +834,15 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES uiDefButS(block, TOG|BIT|7, SEQ_BUT_RELOAD, "Reverse Frames", 10,30,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Reverse frame order"); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Strobe:", 10,10,150,19, &last_seq->strobe, 1.0, 30.0, 100, 0, "Only display every nth frame"); uiDefButI(block, NUM, SEQ_BUT_RELOAD, "Preseek:", 10,-10,150,19, &last_seq->anim_preseek, 0.0, 50.0, 100, 0, "On MPEG-seeking preseek this many frames"); - + uiBlockEndAlign(block); } else if(last_seq->type==SEQ_RAM_SOUND || last_seq->type==SEQ_HD_SOUND) { uiDefBut(block, LABEL, 0, "Type: Audio", 10,140,150,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, TEX, 0, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, ""); - + + uiBlockBeginAlign(block); uiDefButBitS(block, TOG, SEQ_IPO_FRAME_LOCKED, SEQ_BUT_RELOAD, "IPO Frame locked", 10,90,150,19, &last_seq->flag, @@ -848,18 +853,20 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES uiDefButBitS(block, TOG, SEQ_MUTE, B_NOP, "Mute", 10,70,120,19, &last_seq->flag, 0.0, 21.0, 100, 0, ""); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Gain (dB):", 10,50,150,19, &last_seq->level, -96.0, 6.0, 100, 0, ""); uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Pan:", 10,30,150,19, &last_seq->pan, -1.0, 1.0, 100, 0, ""); + uiBlockEndAlign(block); } else if(last_seq->type>=SEQ_EFFECT) { uiDefBut(block, LABEL, 0, "Type: Effect", 10,140,150,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, ""); - + uiDefButBitS(block, TOG, SEQ_IPO_FRAME_LOCKED, SEQ_BUT_RELOAD, "IPO Frame locked", 10,90,150,19, &last_seq->flag, 0.0, 1.0, 0, 0, "Lock the IPO coordinates to the " "global frame counter."); - + + uiBlockBeginAlign(block); if(last_seq->type==SEQ_WIPE){ WipeVars *wipe = (WipeVars *)last_seq->effectdata; char formatstring[256]; @@ -888,10 +895,8 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES uiDefButI(block, NUM, B_NOP, "Quality:", 10,-5,150,19, &glow->dQuality, 1.0, 5.0, 0, 0, "Accuracy of the blur effect"); uiDefButI(block, TOG, B_NOP, "Only boost", 10,-25,150,19, &glow->bNoComp, 0.0, 0.0, 0, 0, "Show the glow buffer only"); } - + uiBlockEndAlign(block); } - - } static void seq_blockhandlers(ScrArea *sa) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 3e75320e6e7..2022ef9644f 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2974,13 +2974,14 @@ void drawinfospace(ScrArea *sa, void *spacedata) xpos+edgsp, y3label, mpref, buth, 0, 0, 0, 0, 0, ""); + uiBlockBeginAlign(block); uiDefButS(block, MENU, B_REDR, "Light1 %x0|Light2 %x1|Light3 %x2", xpos+edgsp, y2, 2*mpref/6, buth, &cur_light, 0.0, 0.0, 0, 0, ""); uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButBitI(block, TOG, 1, B_RECALCLIGHT, "On", xpos+edgsp+2*mpref/6, y2, mpref/6, buth, &U.light[cur_light].flag, 0.0, 0.0, 0, 0, "Enable this OpenGL light in Solid draw mode"); - + uiBlockSetCol(block, TH_AUTO); uiDefButS(block, ROW, B_REDR, "Vec", xpos+edgsp+3*mpref/6, y2, mpref/6, buth, @@ -2991,7 +2992,9 @@ void drawinfospace(ScrArea *sa, void *spacedata) uiDefButS(block, ROW, B_REDR, "Spec", xpos+edgsp+5*mpref/6, y2, mpref/6, buth, &cur_light_var, 123.0, 2.0, 0, 0, "Specular color for OpenGL light"); - + uiBlockEndAlign(block); + + uiBlockBeginAlign(block); if(cur_light_var==1) { uiDefButF(block, NUM, B_RECALCLIGHT, "R ", xpos+edgsp, y1, mpref/3, buth, @@ -3025,6 +3028,7 @@ void drawinfospace(ScrArea *sa, void *spacedata) xpos+edgsp+2*mpref/3, y1, mpref/3, buth, U.light[cur_light].vec+2, -1.0, 1.0, 100, 2, ""); } + uiBlockEndAlign(block); /* uiDefButBitS(block, TOG, USER_EVTTOCONSOLE, 0, "Log Events to Console",