[Bf-blender-cvs] [56e7291] master: Dopesheet: Make frame range for new editor instances saner, by basing them on the current frame range

Joshua Leung noreply at git.blender.org
Fri Jan 22 13:57:23 CET 2016


Commit: 56e729105a48fe71b82c8131888910ba3a6451b6
Author: Joshua Leung
Date:   Sat Jan 23 01:50:11 2016 +1300
Branches: master
https://developer.blender.org/rB56e729105a48fe71b82c8131888910ba3a6451b6

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.

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

M	source/blender/editors/space_action/space_action.c

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

diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index b6f4600..09746b6 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;




More information about the Bf-blender-cvs mailing list