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/drawoops.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/drawoops.c')
-rw-r--r-- | source/blender/src/drawoops.c | 80 |
1 files changed, 42 insertions, 38 deletions
diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c index dacbf86b60a..e2792737e76 100644 --- a/source/blender/src/drawoops.c +++ b/source/blender/src/drawoops.c @@ -58,13 +58,13 @@ #include "BKE_utildefines.h" #include "BKE_global.h" -#include "BIF_gl.h" #include "BIF_interface.h" +#include "BIF_gl.h" #include "BIF_glutil.h" -#include "BIF_resources.h" -#include "BIF_screen.h" #include "BIF_mywindow.h" +#include "BIF_outliner.h" #include "BIF_resources.h" +#include "BIF_screen.h" /* #include "BIF_drawoops.h" bad name :(*/ #include "BIF_oops.h" @@ -388,6 +388,7 @@ void draw_oops(Oops *oops) void drawoopsspace(ScrArea *sa, void *spacedata) { + SpaceOops *soops= spacedata; Oops *oops; float col[3]; int ofsx, ofsy; @@ -395,57 +396,60 @@ void drawoopsspace(ScrArea *sa, void *spacedata) BIF_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - if(G.soops==0) return; - - boundbox_oops(); - calc_scrollrcts(G.v2d, curarea->winx, curarea->winy); + if(soops==0) return; + + if(soops->type==SO_OUTLINER) draw_outliner(sa, soops); + else { + boundbox_oops(); + calc_scrollrcts(G.v2d, curarea->winx, curarea->winy); - if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) { - if(G.v2d->scroll) { - ofsx= curarea->winrct.xmin; /* because of mywin */ - ofsy= curarea->winrct.ymin; + if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) { + if(G.v2d->scroll) { + ofsx= curarea->winrct.xmin; /* because of mywin */ + ofsy= curarea->winrct.ymin; - glViewport(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); - glScissor(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); + glViewport(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); + glScissor(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); + } } - } - myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); + myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); - oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin); - calc_ipogrid(); /* for scrollvariables */ - build_oops(); + oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin); + calc_ipogrid(); /* for scrollvariables */ + build_oops(); - oops= G.soops->oops.first; - while(oops) { - if(oops->hide==0) { - draw_oopslink(oops); + oops= soops->oops.first; + while(oops) { + if(oops->hide==0) { + draw_oopslink(oops); + } + oops= oops->next; } - oops= oops->next; - } - oops= G.soops->oops.first; - while(oops) { - if(oops->hide==0) { - if(oops->flag & SELECT); else draw_oops(oops); + oops= soops->oops.first; + while(oops) { + if(oops->hide==0) { + if(oops->flag & SELECT); else draw_oops(oops); + } + oops= oops->next; } - oops= oops->next; - } - oops= G.soops->oops.first; - while(oops) { - if(oops->hide==0) { - if(oops->flag & SELECT) draw_oops(oops); + oops= soops->oops.first; + while(oops) { + if(oops->hide==0) { + if(oops->flag & SELECT) draw_oops(oops); + } + oops= oops->next; } - oops= oops->next; } /* restore viewport */ mywinset(curarea->win); - /* ortho at pixel level curarea */ myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375); - if(G.v2d->scroll) { - drawscroll(0); + + if(sa->winx>SCROLLB+10 && sa->winy>SCROLLH+10) { + if(G.v2d->scroll) drawscroll(0); } draw_area_emboss(sa); |