diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-13 21:30:53 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-15 14:39:30 +0300 |
commit | e4c93dc7db9b50acf898b667c95b208856b80ea8 (patch) | |
tree | c3db350ee276b7437d8ed69133fe51d21750e9ae /source/blender/editors/interface/view2d_ops.c | |
parent | c86a6f3efbffbf81b663eb1fb57b4736d8e906ee (diff) |
Zoom to frame options, requested by the Hwoozeberry (dutch translation)
team.
There are 3 options here:
1) Keep range (previous behaviour)
2) Seconds - allows a specified offset in seconds around current frame
3) keyframes - zoom to include a number of keyframes around the cursor
Options 2 and 3 have their own properties to tweak the behaviour and all
options can be found in User Preferences->Interface under the 2D
viewports section.
Number 3 will probably need some refinement so commiting here for the
hwoozeberry team to test first.
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 9fed02ee096..eafc5c1d24c 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1468,21 +1468,6 @@ void UI_view2d_smooth_view( } } -void UI_view2d_center_frame(struct bContext *C, int smooth_viewtx) -{ - ARegion *ar = CTX_wm_region(C); - Scene *scene = CTX_data_scene(C); - float w = BLI_rctf_size_x(&ar->v2d.cur); - rctf newrct; - - newrct.xmax = scene->r.cfra + (w / 2); - newrct.xmin = scene->r.cfra - (w / 2); - newrct.ymax = ar->v2d.cur.ymax; - newrct.ymin = ar->v2d.cur.ymin; - - UI_view2d_smooth_view(C, ar, &newrct, smooth_viewtx); -} - /* only meant for timer usage */ static int view2d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { |