diff options
author | Matt Ebb <matt@mke3.net> | 2004-07-19 11:08:51 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2004-07-19 11:08:51 +0400 |
commit | 66c2b4aacef210d721c35321147ae64d3950c9f1 (patch) | |
tree | da466e4450dbea7394bbd8a49ac7a60f40973285 | |
parent | 6883efe712d5c29239372849295332b7aaa30584 (diff) |
Details, details...
* Aligned the header align toggle button thing with the
menu and gave handle_view3d_around() a prototype to
clean up a warning
* Replaced the conglomerate of abbreviated texture blend
modes with a menu
-rw-r--r-- | source/blender/include/BIF_space.h | 1 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 47 | ||||
-rw-r--r-- | source/blender/src/header_view3d.c | 28 |
3 files changed, 56 insertions, 20 deletions
diff --git a/source/blender/include/BIF_space.h b/source/blender/include/BIF_space.h index 75719761961..14f83531ae6 100644 --- a/source/blender/include/BIF_space.h +++ b/source/blender/include/BIF_space.h @@ -94,6 +94,7 @@ extern void force_draw(void); extern void force_draw_all(void); extern void force_draw_plus(int type); extern void freespacelist(struct ListBase *lb); +extern void handle_view3d_around(void); extern void handle_view3d_lock(void); extern void init_butspace(struct ScrArea *sa); extern void init_filespace(struct ScrArea *sa); diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index dda33e584a0..6174e6e029f 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2351,6 +2351,46 @@ void do_matbuts(unsigned short event) } } +static char *mapto_blendtype_pup(void) +{ + static char string[1024]; + char formatstr[1024]; + char tempstr[1024]; + + strcpy(string, "Layer Blending Mode: %t"); + strcpy(formatstr, "|%s %%x%d"); + + sprintf(tempstr, formatstr, "Mix", MTEX_BLEND); + strcat(string, tempstr); + + //strcat(string, "|%l"); + + sprintf(tempstr, formatstr, "Add", MTEX_ADD); + strcat(string, tempstr); + sprintf(tempstr, formatstr, "Lighten", MTEX_LIGHT); + strcat(string, tempstr); + sprintf(tempstr, formatstr, "Screen", MTEX_SCREEN); + strcat(string, tempstr); + + //strcat(string, "|%l"); + + sprintf(tempstr, formatstr, "Subtract", MTEX_SUB); + strcat(string, tempstr); + sprintf(tempstr, formatstr, "Darken", MTEX_DARK); + strcat(string, tempstr); + sprintf(tempstr, formatstr, "Multiply", MTEX_MUL); + strcat(string, tempstr); + + //strcat(string, "|%l"); + + sprintf(tempstr, formatstr, "Difference", MTEX_DIFF); + strcat(string, tempstr); + sprintf(tempstr, formatstr, "Divide", MTEX_DIV); + strcat(string, tempstr); + + return (string); +} + static void material_panel_map_to(Material *ma) { uiBlock *block; @@ -2408,7 +2448,11 @@ static void material_panel_map_to(Material *ma) uiDefButS(block, TOG3|BIT|6, B_MATPRV, "Emit", 1080,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value"); uiDefButS(block, TOG3|BIT|10, B_MATPRV, "Translu",1140,160,65,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the translucency value"); uiDefButS(block, TOG3|BIT|12, B_MATPRV, "Disp", 1205,160,55,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface"); + uiBlockEndAlign(block); + uiDefButS(block, MENU, B_MATPRV, mapto_blendtype_pup(),1087,100,179,18, &(mtex->blendtype), 0, 0, 0, 0, "Texture blending mode"); + + /* uiBlockBeginAlign(block); uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,133,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Sets texture to blend the values or colour"); uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,133,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Sets texture to multiply the values or colour"); @@ -2421,6 +2465,7 @@ static void material_panel_map_to(Material *ma) uiDefButS(block, ROW, B_MATPRV, "Light", 1087,98,90,18, &(mtex->blendtype), 9.0, (float)MTEX_LIGHT, 0, 0, "Sets texture to choose the lighter value"); uiDefButS(block, ROW, B_MATPRV, "Dark", 1177,98,89,18, &(mtex->blendtype), 9.0, (float)MTEX_DARK, 0, 0, "Sets texture to choose the darker"); + */ uiBlockBeginAlign(block); uiDefButF(block, NUMSLI, B_MATPRV, "Col ", 1087,70,179,18, &(mtex->colfac), 0.0, 1.0, 0, 0, "Sets the amount the texture affects colour values"); @@ -2750,7 +2795,7 @@ static void material_panel_ramps(Material *ma) uiDefBut(block, LABEL, 0, "Factor",190,30,120,20, NULL, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); uiDefButC(block, MENU, B_MATPRV, "Shader %x0|Energy %x1|Normal %x2|Result %x3",10,10,90,20, inputc, 0, 0, 0, 0, "Input for Ramp"); - uiDefButC(block, MENU, B_MATPRV, "Mix %x0|Add %x1|Mult %x2|Sub %x3",110,10,90,20, methodc, 0, 0, 0, 0, "Blending method for Ramp (uses alpha in Colorband)"); + uiDefButC(block, MENU, B_MATPRV, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2",110,10,90,20, methodc, 0, 0, 0, 0, "Blending method for Ramp (uses alpha in Colorband)"); uiDefButF(block, NUMSLI, B_MATPRV, "", 190,10,120,20, facp, 0.0, 1.0, 100, 0, "Blending factor (also uses alpha in Colorband)"); } } diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 77be9ec4398..68f33253fa6 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -3862,31 +3862,21 @@ void view3d_buttons(void) /* DRAWTYPE */ uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_BBOX, drawtype_pup(), xco,0,XIC+10,YIC, &(G.vd->drawtype), 1.0, 5.0, 0, 0, "Viewport Shading (Hotkeys: Z, Shift Z, Ctrl Z, Alt Z"); - // uiDefIconButS(block, ICONROW, B_REDR, ICON_BBOX, xco,0,XIC+10,YIC, &(G.vd->drawtype), 1.0, 5.0, 0, 0, "Drawtype: boundbox/wire/solid/shaded (ZKEY, SHIFT+Z)"); - - // uiDefIconTextButS(block, MENU, REDRAWVIEW3D, (ICON_BBOX+G.vd->drawtype-1), "Viewport Shading%t|Bounding Box %x1|Wireframe %x2|Solid %x3|Shaded %x4|Textured %x5", - // xco,0,124,20, &(G.vd->drawtype), 0, 0, 0, 0, "Viewport Shading"); - // uiDefButS(block, MENU, REDRAWVIEW3D, "Viewport Shading%t|Bounding Box %x1|Wireframe %x2|Solid %x3|Shaded %x4|Textured %x5", - // xco,0,110,20, &(G.vd->drawtype), 0, 0, 0, 0, "Viewport Shading"); - - /* around */ xco+= XIC+18; - uiDefIconTextButS(block, ICONTEXTROW,B_AROUND, ICON_ROTATE, around_pup(), xco,0,XIC+10,YIC, &(G.vd->around), 0, 3.0, 0, 0, "Rotation/Scaling Pivot (Hotkeys: Comma, Period) "); - /* - uiDefIconButS(block, ROW, 1, ICON_ROTATE, xco+=XIC,0,XIC,YIC, &G.vd->around, 3.0, 0.0, 0, 0, "Enables Rotation or Scaling around boundbox center (COMMAKEY)"); - uiDefIconButS(block, ROW, 1, ICON_ROTATECENTER, xco+=XIC,0,XIC,YIC, &G.vd->around, 3.0, 3.0, 0, 0, "Enables Rotation or Scaling around median point"); - uiDefIconButS(block, ROW, 1, ICON_CURSOR, xco+=XIC,0,XIC,YIC, &G.vd->around, 3.0, 1.0, 0, 0, "Enables Rotation or Scaling around cursor (DOTKEY)"); - uiDefIconButS(block, ROW, 1, ICON_ROTATECOLLECTION, xco+=XIC,0,XIC,YIC, &G.vd->around, 3.0, 2.0, 0, 0, "Enables Rotation or Scaling around individual object centers"); - */ - xco+= 18; + uiBlockBeginAlign(block); + uiDefIconTextButS(block, ICONTEXTROW,B_AROUND, ICON_ROTATE, around_pup(), xco,0,XIC+10,YIC, &(G.vd->around), 0, 3.0, 0, 0, "Rotation/Scaling Pivot (Hotkeys: Comma, Period) "); + + xco+= XIC+10; uiDefIconButS(block, TOG|BIT|10, B_AROUND, ICON_ALIGN, - xco+=XIC,0,XIC,YIC, - &G.vd->flag, 0, 0, 0, 0, "Translate only (align)"); + xco,0,XIC,YIC, + &G.vd->flag, 0, 0, 0, 0, "Move object centers only"); + uiBlockEndAlign(block); + + xco+= XIC+8; - xco+= XIC+14; /* LAYERS */ if(G.vd->localview==0) { |