Tiny cleanups of marker drawing code. Shouldn't cause any problems.

This commit is contained in:
2007-02-11 04:02:17 +00:00
parent b90a0ce285
commit 045c40b815
6 changed files with 11 additions and 15 deletions

View File

@@ -54,8 +54,7 @@ int find_nearest_marker_time(float dx);
void add_marker_to_cfra_elem(struct ListBase *lb, struct TimeMarker *marker, short only_sel);
void make_marker_cfra_list(struct ListBase *lb, short only_sel);
/* ******** Markers - Space Specific ************* */
void draw_markers_timespace(struct View2D *v2d);
void draw_markers_timespace(void);
/* *********** TimeLine Specific ***************/
void timeline_frame_to_center(void);

View File

@@ -705,7 +705,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
draw_cfra_action();
/* Draw markers */
draw_markers_timespace(&(G.saction->v2d));
draw_markers_timespace();
/* Draw scroll */
mywinset(curarea->win); // reset scissor too

View File

@@ -2163,7 +2163,7 @@ void drawipospace(ScrArea *sa, void *spacedata)
draw_ipovertices(1);
/* draw markers */
draw_markers_timespace(&(sipo->v2d));
draw_markers_timespace();
/* restore viewport */
mywinset(sa->win);

View File

@@ -673,7 +673,6 @@ static void nla_blockhandlers(ScrArea *sa)
void drawnlaspace(ScrArea *sa, void *spacedata)
{
SpaceNla *snla= G.snla;
float col[3];
short ofsx = 0, ofsy = 0;
@@ -719,7 +718,7 @@ void drawnlaspace(ScrArea *sa, void *spacedata)
draw_cfra_action();
/* draw markers */
draw_markers_timespace(&(snla->v2d));
draw_markers_timespace();
/* Draw scroll */
mywinset(curarea->win); // reset scissor too

View File

@@ -189,7 +189,6 @@ static void draw_cfra_sound(SpaceSound *ssound)
void drawsoundspace(ScrArea *sa, void *spacedata)
{
SpaceSound *ssound;
float col[3];
short ofsx, ofsy;
@@ -219,9 +218,8 @@ void drawsoundspace(ScrArea *sa, void *spacedata)
draw_sample(G.ssound->sound->sample);
}
ssound= spacedata;
draw_cfra_sound(ssound);
draw_markers_timespace(&(ssound->v2d));
draw_cfra_sound(spacedata);
draw_markers_timespace();
/* restore viewport */
mywinset(curarea->win);

View File

@@ -181,17 +181,17 @@ static void draw_markers_time(void)
}
}
void draw_markers_timespace(View2D *v2d)
void draw_markers_timespace()
{
TimeMarker *marker;
float yspace, ypixels;
/* move ortho view to align with slider in bottom */
glTranslatef(0.0f, v2d->cur.ymin, 0.0f);
glTranslatef(0.0f, G.v2d->cur.ymin, 0.0f);
/* bad hacks in drawing markers... inverse correct that as well */
yspace= v2d->cur.ymax - v2d->cur.ymin;
ypixels= v2d->mask.ymax - v2d->mask.ymin;
yspace= G.v2d->cur.ymax - G.v2d->cur.ymin;
ypixels= G.v2d->mask.ymax - G.v2d->mask.ymin;
glTranslatef(0.0f, -11.0*yspace/ypixels, 0.0f);
/* unselected markers are drawn at the first time */
@@ -205,7 +205,7 @@ void draw_markers_timespace(View2D *v2d)
if(marker->flag & SELECT) draw_marker(marker);
}
glTranslatef(0.0f, -v2d->cur.ymin, 0.0f);
glTranslatef(0.0f, -G.v2d->cur.ymin, 0.0f);
glTranslatef(0.0f, 11.0*yspace/ypixels, 0.0f);
}