diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-06 22:55:00 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-06 22:55:00 +0400 |
commit | d5e0c065bc58a8a6e45a5ffee58fb97f120228e6 (patch) | |
tree | ce4f18cb2b3a010441a5011f8d89065da5699f44 /source/blender/src/interface_panel.c | |
parent | d5e1d1844a6aba0fc66e456b3fa3e70a9e4e98e1 (diff) |
Version 1.0 of the new Outliner
The outliner is a hierarchical diagram displaying a list of data in Blender
and its dependencies. The 'databrowse' doesn't really show it, and Oops is
too chaotic still. And most of all, the former two don't offer much tools.
After discussions on irc, Matt came with this design proposal;
http://mke3.net/blender/interface/layout/outliner/
Which is closely followed for the implementation.
The current version only shows all 'library data' in Blender (objects,
meshes, ipos, etc) and not the 'direct data' such as vertex groups or NLA.
I decided to make it inside the Oopw window, as an option. You can find the
option in the "View" pulldown, or directly invoke it with ALT+SHIFT+F9
Here's a quick overview of the Outliner GUI:
- Header pulldown has options what it can show (Visible = in current layers)
- click on triangle arrow to open/close
- press AKEY to open/close all
- Leftmouse click on an item activates; and does based on type a couple of
extra things:
- activates a scene
- selects/activates the Object
- enters editmode (if clicked on Mesh, Curve, etc)
- shows the appropriate Shading buttons (Lamp, Material, Texture)
- sets the IpoWindow to the current IPO
- activates the Ipo-channel in an Action
- Selected and Active objects are drawn in its Theme selection color
- SHIFT+click on Object does extend-select
- Press DOTkey to get the current active data in center of view
TODO;
- rightmouse selection; for indicating operations like delete or duplicate
- showing more data types
- icon (re)design...
- lotsof options as described in Matts paper still...
Diffstat (limited to 'source/blender/src/interface_panel.c')
-rw-r--r-- | source/blender/src/interface_panel.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c index 0617b222aa2..4847a63d56e 100644 --- a/source/blender/src/interface_panel.c +++ b/source/blender/src/interface_panel.c @@ -882,6 +882,11 @@ static void ui_draw_panel_header(uiBlock *block) if(panel->control & UI_PNL_CLOSE) pnl_icons+= PNL_ICON; if(nr==1) { + // full header + BIF_ThemeColorShade(TH_HEADER, -30); + uiSetRoundBox(3); + uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); + /* active tab */ /* draw text label */ BIF_ThemeColor(TH_TEXT_HI); @@ -890,6 +895,11 @@ static void ui_draw_panel_header(uiBlock *block) return; } + // tabbed, full header brighter + BIF_ThemeColorShade(TH_HEADER, 0); + uiSetRoundBox(3); + uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); + a= 0; width= (panel->sizex - 3 - pnl_icons - PNL_ICON)/nr; pa= curarea->panels.first; @@ -900,11 +910,11 @@ static void ui_draw_panel_header(uiBlock *block) /* draw the active tab */ uiSetRoundBox(3); - BIF_ThemeColorShade(TH_HEADER, -3); + BIF_ThemeColorShade(TH_HEADER, -30); uiRoundBox(2+pnl_icons+a*width, panel->sizey-1, pnl_icons+(a+1)*width, panel->sizey+PNL_HEADER-3, 8); /* draw the active text label */ - BIF_ThemeColor(TH_TEXT); + BIF_ThemeColor(TH_TEXT_HI); ui_rasterpos_safe(16+pnl_icons+a*width, panel->sizey+4, block->aspect); str= ui_block_cut_str(block, pa->panelname, (short)(width-10)); BIF_DrawString(block->curfont, str, (U.transopts & USER_TR_BUTTONS)); @@ -914,11 +924,11 @@ static void ui_draw_panel_header(uiBlock *block) else if(pa->paneltab==panel) { /* draw an inactive tab */ uiSetRoundBox(3); - BIF_ThemeColorShade(TH_HEADER, -60); + BIF_ThemeColorShade(TH_HEADER, -10); uiRoundBox(2+pnl_icons+a*width, panel->sizey, pnl_icons+(a+1)*width, panel->sizey+PNL_HEADER-3, 8); /* draw an inactive tab label */ - BIF_ThemeColorShade(TH_TEXT_HI, -40); + BIF_ThemeColor(TH_TEXT); ui_rasterpos_safe(16+pnl_icons+a*width, panel->sizey+4, block->aspect); str= ui_block_cut_str(block, pa->panelname, (short)(width-10)); BIF_DrawString(block->curfont, str, (U.transopts & USER_TR_BUTTONS)); @@ -1050,10 +1060,6 @@ void ui_draw_panel(uiBlock *block) } /* floating panel */ else if(panel->control & UI_PNL_TRANSP) { - BIF_ThemeColorShade(TH_HEADER, -30); - - uiSetRoundBox(3); - uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 8); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glEnable(GL_BLEND); @@ -1375,9 +1381,12 @@ void uiDrawBlocksPanels(ScrArea *sa, int re_align) if(minx<0.0) dx= -minx; else if(maxx > (float)sa->winx) dx= sa->winx-maxx; + if( minx + dx < 0.0) dx= -minx; // when panel cant fit, put it fixed here + if(miny<0.0) dy= -miny; else if(maxy > (float)sa->winy) dy= sa->winy-maxy; - + if( miny + dy < 0.0) dy= -miny; // when panel cant fit, put it fixed here + block->panel->ofsx+= dx/sl->blockscale; block->panel->ofsy+= dy/sl->blockscale; |