Do not show fps while scrubbing.

This commit is contained in:
Antony Riakiotakis
2015-06-05 16:47:01 +02:00
parent cbf936a332
commit a3b86611a8
3 changed files with 16 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, int mute
void ED_refresh_viewport_fps(struct bContext *C);
int ED_screen_animation_play(struct bContext *C, int sync, int mode);
bScreen *ED_screen_animation_playing(const struct wmWindowManager *wm);
bScreen *ED_screen_animation_no_scrub(const struct wmWindowManager *wm);
/* screen keymaps */
void ED_operatortypes_screen(void);

View File

@@ -3634,6 +3634,20 @@ bScreen *ED_screen_animation_playing(const wmWindowManager *wm)
return NULL;
}
bScreen *ED_screen_animation_no_scrub(const wmWindowManager *wm)
{
wmWindow *win;
for (win = wm->windows.first; win; win = win->next) {
if (win->screen->animtimer) {
return win->screen;
}
}
return NULL;
}
/* toggle operator */
int ED_screen_animation_play(bContext *C, int sync, int mode)
{

View File

@@ -3877,7 +3877,7 @@ static void view3d_main_area_draw_info(const bContext *C, Scene *scene,
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
wmWindowManager *wm = CTX_wm_manager(C);
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) {
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {
ED_scene_draw_fps(scene, &rect);
}
else if (U.uiflag & USER_SHOW_VIEWPORTNAME) {