diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 256d114fbdc..5cfda009514 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -137,7 +137,7 @@ void ED_operatortypes_paint(void) /* face-select */ WM_operatortype_append(PAINT_OT_face_select_linked); WM_operatortype_append(PAINT_OT_face_select_linked_pick); - WM_operatortype_append(PAINT_OT_face_deselect_all); + WM_operatortype_append(PAINT_OT_face_select_all); } static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *path) @@ -173,12 +173,14 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *path) RNA_int_set(kmi->ptr, "value", 8); kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", ZEROKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "path", path); - RNA_int_set(kmi->ptr, "value", 10); + RNA_int_set(kmi->ptr, "value", 9); } void ED_keymap_paint(wmKeyConfig *keyconf) { wmKeyMap *keymap; + wmKeyMapItem *kmi; + int i; /* Sculpt mode */ keymap= WM_keymap_find(keyconf, "Sculpt", 0, 0); @@ -193,6 +195,57 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_switch(keymap, "tool_settings.sculpt.active_brush_index"); + for(i=0; i<=5; i++) + RNA_int_set(WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0)->ptr, "level", i); + + /* multires switch */ + kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0); + RNA_int_set(kmi->ptr, "level", 1); + RNA_boolean_set(kmi->ptr, "relative", 1); + + kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0); + RNA_int_set(kmi->ptr, "level", -1); + RNA_boolean_set(kmi->ptr, "relative", 1); + + /* toggles */ + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_anchor"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_SHIFT, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_smooth_stroke"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", RKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_rake"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, KM_SHIFT, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_airbrush"); + + /* brush switching */ + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", DKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "DRAW"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", SKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "SMOOTH"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "PINCH"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", GKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "GRAB"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", LKEY, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "LAYER"); + + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", TKEY, KM_PRESS, KM_SHIFT, 0); /* was just T in 2.4x */ + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool"); + RNA_string_set(kmi->ptr, "value", "FLATTEN"); + + /* Vertex Paint mode */ keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0); keymap->poll= vertex_paint_poll; @@ -238,7 +291,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) keymap= WM_keymap_find(keyconf, "Face Mask", 0, 0); keymap->poll= facemask_paint_poll; - WM_keymap_add_item(keymap, "PAINT_OT_face_deselect_all", AKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked_pick", LKEY, KM_PRESS, 0, 0); |