diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 86abf29c308..e504c858efa 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -328,6 +328,8 @@ float ED_view3d_offset_distance(float mat[4][4], const float ofs[3], const float float ED_scene_grid_scale(struct Scene *scene, const char **grid_unit); float ED_view3d_grid_scale(struct Scene *scene, struct View3D *v3d, const char **grid_unit); +void ED_scene_draw_fps(struct Scene *scene, struct rcti *rect); + /* view matrix properties utilities */ /* unused */ #if 0 diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 84c6329db53..4a4754e8adc 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -54,6 +54,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "UI_interface.h" #include "UI_resources.h" #include "UI_view2d.h" @@ -534,8 +535,9 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) ScrArea *sa = CTX_wm_area(C); SpaceSeq *sseq = sa->spacedata.first; Scene *scene = CTX_data_scene(C); + wmWindowManager *wm = CTX_wm_manager(C); int show_split = scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW && sseq->mainb == SEQ_DRAW_IMG_IMBUF; - + /* XXX temp fix for wrong setting in sseq->mainb */ if (sseq->mainb == SEQ_DRAW_SEQUENCE) sseq->mainb = SEQ_DRAW_IMG_IMBUF; @@ -554,6 +556,11 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) draw_image_seq(C, scene, ar, sseq, scene->r.cfra, over_cfra - scene->r.cfra, TRUE); } + if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) { + rcti rect; + ED_region_visible_rect(ar, &rect); + ED_scene_draw_fps(scene, &rect); + } } static void sequencer_preview_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 24edfb413c8..a37d98e416d 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2857,7 +2857,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w /* NOTE: the info that this uses is updated in ED_refresh_viewport_fps(), * which currently gets called during SCREEN_OT_animation_step. */ -static void draw_viewport_fps(Scene *scene, rcti *rect) +void ED_scene_draw_fps(Scene *scene, rcti *rect) { ScreenFrameRateInfo *fpsi = scene->fps_info; float fps; @@ -3454,7 +3454,7 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) { - draw_viewport_fps(scene, &rect); + ED_scene_draw_fps(scene, &rect); } else if (U.uiflag & USER_SHOW_VIEWPORTNAME) { draw_viewport_name(ar, v3d, &rect); |