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:
authorDamien Plisson <damien.plisson@yahoo.fr>2010-01-11 14:14:36 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2010-01-11 14:14:36 +0300
commit4a011a99cb9f45e0d76b134d72c2c2ab150ba006 (patch)
tree6141ccea3ff99236c32e31f479ef5ba36835a629 /source/blender/editors/space_view3d/view3d_ops.c
parentebb9286fd65d3cb1aae001080dbdb7102e7b49bf (diff)
Multitouch trackpad 2 fingers gestures implementation
- 2 fingers scroll (MOUSEPAN / GHOST_kTrackpadEventScroll event) pans/scrolls the view - 2 fingers pinch (MOUSEZOOM / GHOST_kTrackpadEventMagnify event) zooms the view And in 3D view: - alt + 2 fingers scroll rotates the view - 2 fingers rotation (MOUSEROTATE / GHOST_kTrackpadEventRotate) orbits the view. The implementation uses a new GHOST event type: GHOST_kEventTrackpad, that is then dispatched as Blender MOUSEPAN, MOUSEZOOM or MOUSEROTATE events. This is currently fully implemented for OSX (GHOST Cocoa fires the new events), with auto-detection of the source peripheral, so that a regular mouse still sends MOUSEWHEEL events.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_ops.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 2bcd78b3d3d..2e134da7e02 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -133,6 +133,11 @@ void view3d_keymap(wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "VIEW3D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_rotate", MOUSEPAN, 0, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_rotate", MOUSEROTATE, 0, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_move", MOUSEPAN, 0, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", MOUSEZOOM, 0, 0, 0);
+
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", PADPLUSKEY, KM_PRESS, 0, 0)->ptr, "delta", 1);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", PADMINUS, KM_PRESS, 0, 0)->ptr, "delta", -1);
RNA_int_set(WM_keymap_add_item(keymap, "VIEW3D_OT_zoom", WHEELINMOUSE, KM_PRESS, 0, 0)->ptr, "delta", 1);