2.5 - Code shuffling

Moved WeightPaint/VertexPaint toggling hotkeys to the same place that the ones for PoseMode/EditMode are defined. This means that the hotkey for toggling PoseMode works again (instead of being overwritten by WeightPaint).
This commit is contained in:
Joshua Leung 2009-08-22 02:53:14 +00:00
parent 0be1e72dca
commit 98272a0138
2 changed files with 9 additions and 7 deletions

@ -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, */

@ -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);