diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 6f1a3b5f6cb..239b162c14f 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -167,10 +167,19 @@ void ED_operatortypes_object(void) void ED_keymap_object(wmWindowManager *wm) { ListBase *keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0); + wmKeymapItem *kmi; /* Note: this keymap works disregarding mode */ WM_keymap_add_item(keymap, "OBJECT_OT_editmode_toggle", TABKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "OBJECT_OT_posemode_toggle", TABKEY, KM_PRESS, KM_CTRL, 0); + + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0); + RNA_enum_set(kmi->ptr, "mode", OB_MODE_VERTEX_PAINT); + RNA_boolean_set(kmi->ptr, "toggle", 1); + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); + RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT); + RNA_boolean_set(kmi->ptr, "toggle", 1); + WM_keymap_add_item(keymap, "OBJECT_OT_center_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0); /* Note: this keymap gets disabled in non-objectmode, */ diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index b0eabae3f5d..929272bc066 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -106,13 +106,6 @@ void view3d_keymap(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0); wmKeymapItem *km; - km = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0); - RNA_enum_set(km->ptr, "mode", OB_MODE_VERTEX_PAINT); - RNA_boolean_set(km->ptr, "toggle", 1); - km = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); - RNA_enum_set(km->ptr, "mode", OB_MODE_WEIGHT_PAINT); - RNA_boolean_set(km->ptr, "toggle", 1); - WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_toolbar", TKEY, KM_PRESS, 0, 0);