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:
authorTon Roosendaal <ton@blender.org>2009-07-26 16:52:39 +0400
committerTon Roosendaal <ton@blender.org>2009-07-26 16:52:39 +0400
commit9ac754eca5466d62abed6d207d1efdbbb7d77b18 (patch)
tree3b0d63d120c6b24de6f5c161774cc9a3d874ab08 /source/blender/makesrna/intern/rna_wm.c
parent7084447c73bd5b2b5fb9aa12a4e3b2e983723c2f (diff)
2.5
First step towards keymap editor! Before getting too excited: - doesn't save yet - no rna properties can be defined - no insert/remove keymap options yet - no option yet to set 'key press/release' But what does work; - Keymap list is in outliner, new category (Keymaps are listed in order as being created now) - enable/disable a keymap entry: click on dot icon - it displays python api names for ops - browse new operator for keymap (menu button) - set keymap to use other keys, mouse or tweak events - four modifier key options I first intent to test it all well, there are still quite some modal map conflicts (like border select) and there's problems assigning items to tweaks Another issue is that a visual editor for keymaps might be quite hard to use... the amount of data and options is just not so fun for a buttons menu. There are ways to improve this though. Maybe do this via a script?
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 9c9c256e819..4a2154bc3cf 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -40,8 +40,28 @@ EnumPropertyItem event_value_items[] = {
{KM_RELEASE, "RELEASE", 0, "Release", ""},
{0, NULL, 0, NULL, NULL}};
-/* not returned: CAPSLOCKKEY, UNKNOWNKEY, COMMANDKEY, GRLESSKEY */
+/* not returned: CAPSLOCKKEY, UNKNOWNKEY, GRLESSKEY */
EnumPropertyItem event_type_items[] = {
+
+ {LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", ""},
+ {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle Mouse", ""},
+ {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right Mouse", ""},
+ {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action Mouse", ""},
+ {SELECTMOUSE, "SELECTMOUSE", 0, "Select Mouse", ""},
+
+ {MOUSEMOVE, "MOUSEMOVE", 0, "Mouse Move", ""},
+
+ {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""},
+ {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""},
+ {WHEELINMOUSE, "WHEELINMOUSE", 0, "Wheel In", ""},
+ {WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
+
+ {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Tweak Left", ""},
+ {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Tweak Middle", ""},
+ {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Tweak Right", ""},
+ {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Tweak Action", ""},
+ {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Tweak Select", ""},
+
{AKEY, "A", 0, "A", ""},
{BKEY, "B", 0, "B", ""},
{CKEY, "C", 0, "C", ""},
@@ -86,6 +106,8 @@ EnumPropertyItem event_type_items[] = {
{RIGHTALTKEY, "RIGHT_ALT", 0, "Right Alt", ""},
{RIGHTCTRLKEY, "RIGHT_CTRL", 0, "Right Ctrl", ""},
{RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, "Right Shift", ""},
+
+ {COMMANDKEY, "COMMAND", 0, "Command", ""},
{ESCKEY, "ESC", 0, "Esc", ""},
{TABKEY, "TAB", 0, "Tab", ""},