diff options
Diffstat (limited to 'source/blender/editors/space_time/space_time.c')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 59314fba48e..eea5891a720 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -45,6 +45,7 @@ #include "BKE_screen.h" #include "BKE_utildefines.h" +#include "ED_anim_api.h" #include "ED_keyframes_draw.h" #include "ED_space_api.h" #include "ED_screen.h" @@ -66,27 +67,6 @@ /* ************************ main time area region *********************** */ -/* draws a current frame indicator for the TimeLine */ -static void time_draw_cfra_time(const bContext *C, SpaceTime *stime, ARegion *ar) -{ - Scene *scene= CTX_data_scene(C); - float vec[2]; - - vec[0]= scene->r.cfra*scene->r.framelen; - - UI_ThemeColor(TH_CFRAME); // no theme, should be global color once... - glLineWidth(3.0); - - glBegin(GL_LINES); - vec[1]= ar->v2d.cur.ymin; - glVertex2fv(vec); - vec[1]= ar->v2d.cur.ymax; - glVertex2fv(vec); - glEnd(); - - glLineWidth(1.0); -} - static void time_draw_sfra_efra(const bContext *C, SpaceTime *stime, ARegion *ar) { View2D *v2d= UI_view2d_fromcontext(C); @@ -218,8 +198,8 @@ static void time_main_area_draw(const bContext *C, ARegion *ar) View2D *v2d= &ar->v2d; View2DGrid *grid; View2DScrollers *scrollers; + int unit, flag=0; float col[3]; - int unit; /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); @@ -241,7 +221,9 @@ static void time_main_area_draw(const bContext *C, ARegion *ar) time_draw_keyframes(C, stime, ar); /* current frame */ - time_draw_cfra_time(C, stime, ar); + if ((stime->flag & TIME_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS; + if (stime->flag & TIME_CFRA_NUM) flag |= DRAWCFRA_SHOW_NUMBOX; + ANIM_draw_cfra(C, v2d, flag); /* markers */ UI_view2d_view_orthoSpecial(C, v2d, 1); |