Do not show fps while scrubbing.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user