diff options
author | Harshit Mehta <harshitmehta2293@gmail.com> | 2014-04-01 19:33:43 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-01 20:00:14 +0400 |
commit | ad7980a51a7e1c2492691e403ffdf84a29081c35 (patch) | |
tree | 8dd690b39cf93e81d7e0d910e93dd78c56d1c7e6 /source/blender/editors/space_clip | |
parent | 420da872a65596920bbf04b15a1bb246c9a523f3 (diff) |
Image and clip editor: change zoom step to end up at powers of two.
When you press zoom 3 times you will now get 2:1, 4:1, 8:1, etc. Fixes T36916.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D409
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 2b425e23183..b901ff4ece8 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -620,7 +620,7 @@ static int view_zoom_in_exec(bContext *C, wmOperator *op) RNA_float_get_array(op->ptr, "location", location); - sclip_zoom_set_factor(C, 1.25f, location); + sclip_zoom_set_factor(C, powf(2.0f, 1.0f/3.0f), location); ED_region_tag_redraw(CTX_wm_region(C)); @@ -663,7 +663,7 @@ static int view_zoom_out_exec(bContext *C, wmOperator *op) RNA_float_get_array(op->ptr, "location", location); - sclip_zoom_set_factor(C, 0.8f, location); + sclip_zoom_set_factor(C, powf(0.5f, 1.0f/3.0f), location); ED_region_tag_redraw(CTX_wm_region(C)); |