Page MenuHome

outliner_hs_01.patch

outliner_hs_01.patch

Index: source/blender/include/BIF_outliner.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/include/BIF_outliner.h,v
retrieving revision 1.12
diff -u -r1.12 BIF_outliner.h
--- source/blender/include/BIF_outliner.h 28 Jan 2006 18:33:13 -0000 1.12
+++ source/blender/include/BIF_outliner.h 13 Jun 2006 11:11:23 -0000
@@ -81,6 +81,7 @@
extern void outliner_toggle_selected(struct ScrArea *sa);
extern void outliner_operation_menu(struct ScrArea *sa);
extern void outliner_page_up_down(struct ScrArea *sa, int up);
+extern void outliner_page_left_right(struct ScrArea *sa, int right);
#endif
Index: source/blender/src/drawipo.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawipo.c,v
retrieving revision 1.83
diff -u -r1.83 drawipo.c
--- source/blender/src/drawipo.c 15 Jun 2006 14:22:59 -0000 1.83
+++ source/blender/src/drawipo.c 16 Jun 2006 07:02:12 -0000
@@ -2440,10 +2440,10 @@
cursor = BC_NSEW_SCROLLCURSOR;
/* no x move in outliner */
- if(curarea->spacetype==SPACE_OOPS && G.v2d->scroll) {
+ /*if(curarea->spacetype==SPACE_OOPS && G.v2d->scroll) {
facx= 0.0;
cursor = BC_NS_SCROLLCURSOR;
- }
+ } */
/* no y move in audio & time */
if ELEM(curarea->spacetype, SPACE_SOUND, SPACE_TIME) {
Index: source/blender/src/outliner.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/outliner.c,v
retrieving revision 1.63
diff -u -r1.63 outliner.c
--- source/blender/src/outliner.c 5 Apr 2006 17:21:24 -0000 1.63
+++ source/blender/src/outliner.c 19 Jun 2006 12:07:48 -0000
@@ -946,6 +946,19 @@
scrarea_queue_redraw(sa);
}
+void outliner_page_left_right(ScrArea *sa, int right)
+{
+ SpaceOops *soops= sa->spacedata.first;
+ int dx= soops->v2d.mask.xmax-soops->v2d.mask.xmin;
+
+ /* hmmm... I wonder if the maths here is right? */
+ if(right == -1) dx= -dx;
+ soops->v2d.cur.xmin+= dx;
+ soops->v2d.cur.xmax+= dx;
+
+ scrarea_queue_redraw(sa);
+}
+
/* **** do clicks on items ******* */
static void tree_element_active_object(SpaceOops *soops, TreeElement *te)
@@ -1571,17 +1584,20 @@
{
SpaceOops *so= sa->spacedata.first;
TreeElement *te;
- int ytop;
+ int xtop,ytop;
if(OBACT == NULL) return;
te= outliner_find_id(so, &so->tree, (ID *)OBACT);
if(te) {
/* make te->ys center of view */
+ xtop= te->xs ; // fixme
ytop= te->ys + (so->v2d.mask.ymax-so->v2d.mask.ymin)/2;
if(ytop>0) ytop= 0;
so->v2d.cur.ymax= ytop;
so->v2d.cur.ymin= ytop-(so->v2d.mask.ymax-so->v2d.mask.ymin);
+ so->v2d.cur.xmax= xtop; // need to write code to do this
+ so->v2d.cur.xmin= xtop-(so->v2d.mask.xmax-so->v2d.mask.xmin); // need to write code to do this. fixme
scrarea_queue_redraw(sa);
}
}
@@ -2417,7 +2433,8 @@
/* selection status */
if(tselem->flag & TSE_SELECTED) {
- glRecti(0, *starty+1, (int)soops->v2d.mask.xmax, *starty+OL_H-1);
+ //glRecti(0, *starty+1, (int)soops->v2d.mask.xmax, *starty+OL_H-1);
+ glRecti(soops->v2d.cur.xmin, *starty+1, (int)soops->v2d.cur.xmax, *starty+OL_H-1);
}
*starty-= OL_H;
if((tselem->flag & TSE_CLOSED)==0) outliner_draw_selection(soops, &te->subtree, starty);
@@ -2446,12 +2463,12 @@
// grey hierarchy lines
BIF_ThemeColorBlend(TH_BACK, TH_TEXT, 0.5);
starty= soops->v2d.tot.ymax-OL_H/2;
- startx= 6;
+ startx= 6;
outliner_draw_hierarchy(soops, &soops->tree, startx, &starty);
// items themselves
starty= soops->v2d.tot.ymax-OL_H;
- startx= 0;
+ startx= 0;
for(te= soops->tree.first; te; te= te->next) {
outliner_draw_tree_element(soops, te, startx, &starty);
}
@@ -2467,7 +2484,8 @@
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
- glRecti(0, ystart, (int)soops->v2d.mask.xmax, ystart+OL_H);
+ //glRecti(0, ystart, (int)soops->v2d.mask.xmax, ystart+OL_H);
+ glRecti((int)soops->v2d.cur.xmin, ystart, (int)soops->v2d.cur.xmax, ystart+OL_H); // Aligorith: attempt to make infinite. mask or something else more suitble?
ystart-= 2*OL_H;
}
}
@@ -2617,9 +2635,15 @@
G.v2d->cur.ymax= 0.0;
G.v2d->cur.ymin= -(G.v2d->mask.ymax-G.v2d->mask.ymin);
}
-
+
myortho2(G.v2d->cur.xmin-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-0.375, G.v2d->cur.ymax-0.375);
-
+
+ /* prevent horizontal scroll from going too far */
+ if (G.v2d->cur.xmin < 0) {
+ G.v2d->cur.xmin= 0;
+ G.v2d->cur.xmax= (G.v2d->mask.xmax-G.v2d->mask.xmin);
+ }
+
/* draw outliner stuff */
outliner_back(soops);
outliner_draw_tree(soops);
@@ -2628,7 +2652,7 @@
mywinset(sa->win);
/* ortho corrected */
- myortho2(G.v2d->cur.xmin-SCROLLB-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-0.375, G.v2d->cur.ymax-0.375);
+ myortho2(G.v2d->cur.xmin-SCROLLB-0.375, G.v2d->cur.xmax-0.375, G.v2d->cur.ymin-SCROLLB-0.375, G.v2d->cur.ymax-0.375);
block= uiNewBlock(&sa->uiblocks, "outliner buttons", UI_EMBOSS, UI_HELV, sa->win);
outliner_buttons(block, soops, &soops->tree);
Index: source/blender/src/space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.357
diff -u -r1.357 space.c
--- source/blender/src/space.c 12 Jun 2006 20:01:18 -0000 1.357
+++ source/blender/src/space.c 13 Jun 2006 11:37:52 -0000
@@ -4333,10 +4333,16 @@
outliner_show_hierarchy(sa);
break;
case PAGEUPKEY:
- outliner_page_up_down(sa, 1);
+ if(G.qual==LR_SHIFTKEY)
+ outliner_page_left_right(sa, 1);
+ else
+ outliner_page_up_down(sa, 1);
break;
case PAGEDOWNKEY:
- outliner_page_up_down(sa, -1);
+ if(G.qual==LR_SHIFTKEY)
+ outliner_page_left_right(sa, -1);
+ else
+ outliner_page_up_down(sa, -1);
break;
case RETKEY:
@@ -4353,6 +4359,21 @@
case PADMINUS:
outliner_one_level(sa, -1);
break;
+
+ case RIGHTARROWKEY:
+ printf("Outliner doing expand level. RightArrowKey \n"); //debug print
+ outliner_one_level(sa, 1);
+ break;
+ case LEFTARROWKEY:
+ printf("Outliner doing close level. LeftArrowKey \n"); // debug print
+ outliner_one_level(sa, -1);
+ break;
+ //case UPARROWKEY:
+ // somefunc that moves the current selection up
+ //break;
+ //case DOWNARROWKEY:
+ // somefunc that moves the current selection down
+ //break;
}
}
else {
@@ -4505,10 +4526,10 @@
v2d->minzoom= 1.0;
v2d->maxzoom= 1.0;
- v2d->scroll= L_SCROLL;
+ v2d->scroll= L_SCROLL+B_SCROLL; // Aligorith: trying to get scrollbars in outliner
v2d->keepaspect= 1;
v2d->keepzoom= 1;
- v2d->keeptot= 1;
+ v2d->keeptot= 0; // originally 1. setting this to 0 seems to set it free. Aligorith
}
else {
v2d->tot.xmin= -28.0;
@@ -4527,8 +4548,8 @@
v2d->minzoom= 0.01f;
v2d->maxzoom= 2.0;
- /* v2d->scroll= L_SCROLL+B_SCROLL; */
- v2d->scroll= 0;
+ /* v2d->scroll= L_SCROLL+B_SCROLL; */
+ v2d->scroll= 0;
v2d->keepaspect= 1;
v2d->keepzoom= 0;
v2d->keeptot= 0;
@@ -4679,7 +4700,7 @@
}
-/* ******************** SPACE: Time ********************** */
+/* ******************** SPACE: Nodes ********************** */
extern void drawnodespace(ScrArea *sa, void *spacedata);
extern void winqreadnodespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ec/1f/2342a91c4239af9c3ce71cb8dc93

Event Timeline