- Edit mesh: Add ctrl+click add vertex or extrude.
  I've made it not move the 3d cursor in that case.

Also found out tweak events conflicted with existing
keymap definitions; on tweak failure (= no mousemove) 
it now passes on the mouse event as 'mouse down' for 
the remaining keymaps to check.
These then actually respond to mouse-up instead of down...

The location in the keymaps where tweaks get generated
remains important. Examples:

1 - 'select' mouse-handler, operator return pass-through
2 - tweak handler checks, and makes tweak event
3 - grabber responds to tweak event

1 - ctrl+mouse tweak handler checks, makes tweak event,
    or passes event on
2 - if tweak event, it runs lasso
3 - else when passed on, ctrl+click extrude happens

In the first case, select works on mouse-down, immediate.
In the second case, extrude happens on mouse-release, even
though the keymap defined mouse-press.

This will make designing nice balanced keymaps still not
simple; especially because you can't tell operators to
pass on the key... although we can add the convention that
select-mouse operators always pass on to enable tweaks.

Still a good reason to wait with custom keymaps
when this is fully settled!
This commit is contained in:
2009-01-30 18:18:41 +00:00
parent 128c8167af
commit 480be71514
17 changed files with 91 additions and 63 deletions

View File

@@ -74,8 +74,8 @@ void node_keymap(struct wmWindowManager *wm)
WM_keymap_add_item(keymap, "NODE_OT_delete_selection", XKEY, KM_PRESS, 0, 0);
/* generates event, needs to be after select to work */
WM_keymap_add_item(keymap, "WM_OT_tweak_gesture", ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "WM_OT_tweak_gesture", SELECTMOUSE, KM_PRESS, 0, 0);
WM_keymap_tweak(keymap, ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_tweak(keymap, SELECTMOUSE, KM_PRESS, 0, 0);
transform_keymap_for_space(wm, keymap, SPACE_NODE);
}