Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2016-01-22 15:50:11 +0300
committerJoshua Leung <aligorith@gmail.com>2016-01-22 15:56:45 +0300
commit56e729105a48fe71b82c8131888910ba3a6451b6 (patch)
tree714ce60efa80f9624f367b29d5786ff1d5181221 /source/blender/editors/space_action
parentac7c3e048b54a2342b1534fd56d91a450e77b1f6 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/space_action.c5
1 files changed, 3 insertions, 2 deletions
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;