[Bf-blender-cvs] [a3b8661] master: Do not show fps while scrubbing.

Antony Riakiotakis noreply at git.blender.org
Wed Jul 29 15:16:09 CEST 2015


Commit: a3b86611a8182a95c5ed2205b0b71bfcc8f0837b
Author: Antony Riakiotakis
Date:   Fri Jun 5 16:47:01 2015 +0200
Branches: master
https://developer.blender.org/rBa3b86611a8182a95c5ed2205b0b71bfcc8f0837b

Do not show fps while scrubbing.

===================================================================

M	source/blender/editors/include/ED_screen.h
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 588b046..c8f1239 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -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);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b157c91..1d31cc0 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -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)
 {
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 0f4e05c..7f553fe 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -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) {




More information about the Bf-blender-cvs mailing list