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:
authorDalai Felinto <dfelinto@gmail.com>2013-08-21 03:40:46 +0400
committerDalai Felinto <dfelinto@gmail.com>2013-08-21 03:40:46 +0400
commit0b0540db3a7c08a1d28653dc8e601e119743e22b (patch)
tree2d097967f8791b7557374dc4252922e2b04d4fa8 /source/blender/editors/space_image/space_image.c
parenta47db8fff6b98f888e549493917ae27e30852f54 (diff)
Image Editor: implement FKey to call 'View All' with 'fit_view'
This mimics the behaviour we have in the Clip Editor. I personally would prefer if we had no border once in fullscreen (current border is 5 pixels). I will consult Sergey Sharybin first to see if we can change that in the clip editor as well (though there I believe the border is useful - the bottom of the editor is used to indicate 'tracked' frames.
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r--source/blender/editors/space_image/space_image.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index c0ef59e9e25..693da62c2be 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -277,6 +277,10 @@ static void image_keymap(struct wmKeyConfig *keyconf)
keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
+
+ kmi = WM_keymap_add_item(keymap, "IMAGE_OT_view_all", FKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(kmi->ptr, "fit_view", TRUE);
+
WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0);