diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-23 15:13:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-23 15:13:48 +0300 |
commit | bb094b8655bac5dcee1b9728891d1e49bb18557e (patch) | |
tree | d1b10efdfc0b434a8fe6cfece5d671f9059b929d /source/blender/editors | |
parent | 489ff11f2bcf327084e8241f14b376ae50cbb583 (diff) |
key shortcits for sculpt back
- T was 'Flatten Brush', now Shift+T
- added an option to OBJECT_OT_subdivision_set to set the level relatively (so page up/down works), however RNA lets it set one level higher then the maximum, this seems displays OK in the 3D view so not sure whats going on here (as if there is always an extra hidden multires level).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 45 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 4 |
3 files changed, 50 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index bd43e9c24c4..7b11bc58950 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -317,7 +317,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "GROUP_OT_objects_add_active", GKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); WM_keymap_verify_item(keymap, "GROUP_OT_objects_remove_active", GKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); - for(i=1; i<=5; i++) { + for(i=0; i<=5; i++) { kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0); RNA_int_set(kmi->ptr, "level", i); } @@ -342,15 +342,15 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym if(do_pet) { /* context ops */ km = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing_falloff"); + RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing_falloff"); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0); - RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing"); + RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing"); RNA_string_set(km->ptr, "value_1", "DISABLED"); RNA_string_set(km->ptr, "value_2", "ENABLED"); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0); - RNA_string_set(km->ptr, "path", "scene.tool_settings.proportional_editing"); + RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing"); RNA_string_set(km->ptr, "value_1", "DISABLED"); RNA_string_set(km->ptr, "value_2", "CONNECTED"); } diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index a54c2b71ee7..b87d229545e 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -179,6 +179,7 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *path) void ED_keymap_paint(wmKeyConfig *keyconf) { wmKeyMap *keymap; + wmKeyMapItem *kmi; int i; /* Sculpt mode */ @@ -194,9 +195,51 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_switch(keymap, "tool_settings.sculpt.active_brush_index"); - for(i=1; i<=5; i++) + 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"); + + /* 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; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 63218369a90..4c118aa2625 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -825,7 +825,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac km = WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(km->ptr, "path", "scene.tool_settings.snap"); + RNA_string_set(km->ptr, "path", "tool_settings.snap"); km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CLICK, 0); @@ -902,7 +902,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac km = WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); - RNA_string_set(km->ptr, "path", "scene.tool_settings.snap"); + RNA_string_set(km->ptr, "path", "tool_settings.snap"); break; default: break; |