diff --git a/source/blender/include/BSE_time.h b/source/blender/include/BSE_time.h index e0061513f6f..fa398ee7da5 100644 --- a/source/blender/include/BSE_time.h +++ b/source/blender/include/BSE_time.h @@ -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); diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index e0597b0db04..9a90cbfa523 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -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 diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 6421374d4c9..ad4e477a461 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -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); diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c index 277e41b5f0e..0368f2984ea 100644 --- a/source/blender/src/drawnla.c +++ b/source/blender/src/drawnla.c @@ -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 diff --git a/source/blender/src/drawsound.c b/source/blender/src/drawsound.c index c4849556683..1fe10bf2c17 100644 --- a/source/blender/src/drawsound.c +++ b/source/blender/src/drawsound.c @@ -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); diff --git a/source/blender/src/drawtime.c b/source/blender/src/drawtime.c index 315d8d004a6..a06541b8665 100644 --- a/source/blender/src/drawtime.c +++ b/source/blender/src/drawtime.c @@ -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); }