Page Menu
Home
Search
Configure Global Search
Log In
Files
F2702
outliner_hs_03.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Joshua Leung (aligorith)
Nov 13 2013, 1:05 PM
Size
6 KB
Subscribers
None
outliner_hs_03.patch
View Options
Index: blender/blenloader/intern/readfile.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenloader/intern/readfile.c,v
retrieving revision 1.280
diff -u -r1.280 readfile.c
--- blender/blenloader/intern/readfile.c 6 Jul 2006 21:18:06 -0000 1.280
+++ blender/blenloader/intern/readfile.c 11 Jul 2006 05:59:55 -0000
@@ -5520,6 +5520,24 @@
strcpy(ima->name, "Viewer Node");
}
}
+
+ /* patch for horizontal scrolling in outliner - does this need to be here?
+ * is this the right code? */
+ /*
+ ScrArea *sa;
+ for(sa= G.curscreen->areabase.first; sa; sa= sa->next) {
+ SpaceLink *sl= sa->spacedata.first;
+ for(; sl; sl= sl->next) {
+ if(sl->spacetype==SPACE_OOPS) {
+ SpaceOops *soops= (SpaceOops *)sl;
+ if(soops->type==SO_OUTLINER) {
+ soops->v2d.scroll= L_SCROLL+B_SCROLL;
+ soops->v2d.keeptot= 0;
+ }
+ }
+ }
+ }
+ */
}
Index: 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
--- blender/include/BIF_outliner.h 28 Jan 2006 18:33:13 -0000 1.12
+++ blender/include/BIF_outliner.h 11 Jul 2006 04:23:43 -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: blender/src/drawipo.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawipo.c,v
retrieving revision 1.84
diff -u -r1.84 drawipo.c
--- blender/src/drawipo.c 25 Jun 2006 12:30:33 -0000 1.84
+++ blender/src/drawipo.c 11 Jul 2006 06:10:40 -0000
@@ -2440,10 +2440,11 @@
cursor = BC_NSEW_SCROLLCURSOR;
/* no x move in outliner */
+ /*
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: blender/src/outliner.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/outliner.c,v
retrieving revision 1.67
diff -u -r1.67 outliner.c
--- blender/src/outliner.c 4 Jul 2006 12:10:37 -0000 1.67
+++ blender/src/outliner.c 11 Jul 2006 06:04:54 -0000
@@ -964,6 +964,20 @@
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;
+
+ if(right == -1) dx= -dx;
+ if (soops->v2d.cur.xmin+dx >= 0) {
+ 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)
@@ -2435,7 +2449,7 @@
/* selection status */
if(tselem->flag & TSE_SELECTED) {
- 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);
@@ -2485,7 +2499,7 @@
ystart= OL_H*(ystart/(OL_H));
while(ystart > soops->v2d.cur.ymin) {
- 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);
ystart-= 2*OL_H;
}
}
@@ -2638,6 +2652,18 @@
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 scrolls from going too far */
+ if (G.v2d->cur.xmin < 0) {
+ G.v2d->cur.xmin= 0.0;
+ G.v2d->cur.xmax= (G.v2d->mask.xmax-G.v2d->mask.xmin);
+ }
+ else if (G.v2d->cur.ymax > 0) {
+ G.v2d->cur.ymin= -(G.v2d->mask.ymax-G.v2d->mask.ymin);
+ G.v2d->cur.ymax= 0.0;
+ }
+
/* draw outliner stuff */
outliner_back(soops);
outliner_draw_tree(soops);
@@ -2646,7 +2672,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: blender/src/space.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/space.c,v
retrieving revision 1.366
diff -u -r1.366 space.c
--- blender/src/space.c 5 Jul 2006 11:59:00 -0000 1.366
+++ blender/src/space.c 11 Jul 2006 06:12:35 -0000
@@ -4337,10 +4337,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:
@@ -4493,9 +4499,9 @@
/* outliner space is window size */
calc_scrollrcts(sa, v2d, sa->winx, sa->winy);
- v2d->tot.xmax= 0.0;
+ v2d->tot.xmax= (v2d->mask.xmax-v2d->mask.xmin); //original 0.0
v2d->tot.ymax= 0.0;
- v2d->tot.xmin= -(v2d->mask.xmax-v2d->mask.xmin);
+ v2d->tot.xmin= 0.0; // originally -(v2d->mask.xmax-v2d->mask.xmin)
v2d->tot.ymin= -(v2d->mask.ymax-v2d->mask.ymin);
v2d->cur= v2d->tot;
@@ -4509,10 +4515,10 @@
v2d->minzoom= 1.0;
v2d->maxzoom= 1.0;
- v2d->scroll= L_SCROLL;
+ v2d->scroll= L_SCROLL+B_SCROLL;
v2d->keepaspect= 1;
v2d->keepzoom= 1;
- v2d->keeptot= 1;
+ v2d->keeptot= 0; // original 1.
}
else {
v2d->tot.xmin= -28.0;
@@ -4683,7 +4689,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
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
14/ea/cb7f17211a958bdc44a0e99f224b
Event Timeline
Log In to Comment