Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-10-27 01:10:58 +0400
committerTon Roosendaal <ton@blender.org>2004-10-27 01:10:58 +0400
commitd6b2f3574a2b668b017cfb1be7326f0d2386f5ab (patch)
tree235acd3a0510bc6c4d91e883b3c906e64c0e0d91 /source/blender/src/drawnla.c
parentb724cc58b23e4a9dd08979ec44cdb5ed25fd53ce (diff)
Bug #1670
Just one simple report, 4-5 hours work... reported was that selecting in action+nla window is slightly off. Quite annoying. It appeared to be a wrong usage of View2D facilities, causing part rewrite of a lot of stuff here. Mainly did it as excercise, to get better understanding of all of this. Would need some testing though! PLus; fixed crash while using "single user" menu with Ipos in Object.
Diffstat (limited to 'source/blender/src/drawnla.c')
-rw-r--r--source/blender/src/drawnla.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 7f3e4a589c6..d95254a4c22 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -96,26 +96,19 @@ static void draw_nlatree(void)
float x, y;
bActionStrip *strip;
bConstraintChannel *conchan;
- float col[3];
myortho2(0, NLAWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax); // Scaling
- /* Blank out the area */
+ /* Clip to the scrollable area */
if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
if(G.v2d->scroll) {
ofsx= curarea->winrct.xmin;
ofsy= curarea->winrct.ymin;
- glViewport(ofsx, ofsy+G.v2d->mask.ymin-SCROLLB, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB));
- glScissor(ofsx, ofsy+G.v2d->mask.ymin-SCROLLB, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB));
+ glViewport(ofsx, ofsy+G.v2d->mask.ymin, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin));
+ glScissor(ofsx, ofsy+G.v2d->mask.ymin, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin));
}
}
- BIF_GetThemeColor3fv(TH_HEADER, col);
- glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* Clip to the scrollable area */
-
glColor3ub(0x00, 0x00, 0x00);
x = 0.0;
@@ -197,7 +190,7 @@ static void draw_nlatree(void)
}
}
- myortho2(0, NLAWIDTH, 0, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB)); // Scaling
+ myortho2(0, NLAWIDTH, 0, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin)); // Scaling
}
static void draw_nlastrips(SpaceNla *snla)
@@ -215,7 +208,7 @@ static void draw_nlastrips(SpaceNla *snla)
/* Draw strips */
scr_rct.xmin= snla->area->winrct.xmin + NLAWIDTH;
- scr_rct.ymin= snla->area->winrct.ymin + snla->v2d.mask.ymin-SCROLLB;
+ scr_rct.ymin= snla->area->winrct.ymin + snla->v2d.mask.ymin;
scr_rct.xmax= snla->area->winrct.xmin + snla->v2d.hor.xmax;
scr_rct.ymax= snla->area->winrct.ymin + snla->v2d.mask.ymax;
di= glaBegin2DDraw(&scr_rct, &G.v2d->cur);
@@ -546,6 +539,11 @@ void drawnlaspace(ScrArea *sa, void *spacedata)
calc_scrollrcts(G.v2d, curarea->winx, curarea->winy);
+ /* clear all, becomes the color for left part */
+ BIF_GetThemeColor3fv(TH_HEADER, col);
+ glClearColor(col[0], col[1], col[2], 0.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
if(G.v2d->scroll) {
ofsx= curarea->winrct.xmin;