diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 18:29:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 18:29:55 +0300 |
commit | df0f1d53b8bb04dda2a460d880e4e4c08dfb1983 (patch) | |
tree | 435715018c591b587c6913fc3eac51d5c8e79195 /source/blender/editors/object/object_ops.c | |
parent | 68f94765bddb3770d2d786af947c587570d65d7e (diff) |
new function WM_keymap_add_menu(), similar to WM_keymap_add_item() except it takes a registered menu. the key will then trigger this menu.
Diffstat (limited to 'source/blender/editors/object/object_ops.c')
-rw-r--r-- | source/blender/editors/object/object_ops.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 898d9a15bd5..f74ab0096ad 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -284,19 +284,13 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0); - kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(kmi->ptr, "name", "INFO_MT_add"); + WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_duplicates_make_real", AKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", AKEY, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_object_apply"); - - kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", UKEY, KM_PRESS, 0, 0); - RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_make_single_user"); - - kmi= WM_keymap_add_item(keymap, "WM_OT_call_menu", LKEY, KM_PRESS, KM_CTRL, 0); - RNA_string_set(kmi->ptr, "name", "VIEW3D_MT_make_links"); + WM_keymap_add_menu(keymap, "VIEW3D_MT_object_apply", AKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_menu(keymap, "VIEW3D_MT_make_single_user", UKEY, KM_PRESS, 0, 0); + WM_keymap_add_menu(keymap, "VIEW3D_MT_make_links", LKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "OBJECT_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "OBJECT_OT_duplicate_move_linked", DKEY, KM_PRESS, KM_ALT, 0); |