diff options
author | Matt Ebb <matt@mke3.net> | 2009-12-28 04:27:05 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-12-28 04:27:05 +0300 |
commit | 78aa9242066a7b4e7723c01a7a538ef8d033ae4b (patch) | |
tree | 3de1dda38588dd22b213b66dd7fd1730cef91fcb /source/blender/editors/sculpt_paint | |
parent | be55097353069b56a2726ebfe87bb2dd0a4b46a6 (diff) |
Change to the way brush/tool selection works, as discussed a while ago
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab,
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to
change between Brushes. The shortcut keys for changing between tools have
now been changed to change between named brushes - the G key in sculpt
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for
each brush. This means that for example, you can draw with a strong textured
Clay brush, but then switch quickly to a weaker, untextured Smooth brush,
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes -
just add a keymap entry similar to the existing ones, that references your own
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just
append them in from the new B.blend in svn.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 5cfda009514..57b56da2fcd 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -193,8 +193,6 @@ void ED_keymap_paint(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); - 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); @@ -208,6 +206,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "relative", 1); /* toggles */ + ed_keymap_paint_brush_switch(keymap, "tool_settings.sculpt.active_brush_index"); + 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"); @@ -222,29 +222,29 @@ void ED_keymap_paint(wmKeyConfig *keyconf) /* 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"); - + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + 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"); - + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + 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"); - + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + 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"); - + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + 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"); - + RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.active_brush_name"); + 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.active_brush_name"); + RNA_string_set(kmi->ptr, "value", "Flatten"); + /* Vertex Paint mode */ keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0); |