From 56e729105a48fe71b82c8131888910ba3a6451b6 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 23 Jan 2016 01:50:11 +1300 Subject: Dopesheet: Make frame range for new editor instances saner, by basing them on the current frame range This brings the dopesheet more in line with the NLA and Graph Editors, where similar initial ranges were also used. The benefit is that it should save animators a small amount of time getting the dopesheet timeline into the right zoom level before starting work. --- source/blender/editors/space_action/space_action.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index b6f4600ab88..09746b639c8 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -63,6 +63,7 @@ static SpaceLink *action_new(const bContext *C) { + Scene *scene = CTX_data_scene(C); ScrArea *sa = CTX_wm_area(C); SpaceAction *saction; ARegion *ar; @@ -98,9 +99,9 @@ static SpaceLink *action_new(const bContext *C) BLI_addtail(&saction->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; - ar->v2d.tot.xmin = -10.0f; + ar->v2d.tot.xmin = (float)(SFRA - 10); ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; - ar->v2d.tot.xmax = (float)(sa->winx); + ar->v2d.tot.xmax = (float)(EFRA + 10); ar->v2d.tot.ymax = 0.0f; ar->v2d.cur = ar->v2d.tot; -- cgit v1.2.3