Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2008-10-12 10:39:47 +0400
committerMatt Ebb <matt@mke3.net>2008-10-12 10:39:47 +0400
commit40221864733a34d6096eeb5ab54b2991c762809f (patch)
tree465ed4c2c5ac88cc1b21821461ae0a8b72f4af38
parent012a98988f24a13494bff3b5515057729790d225 (diff)
* Patch #17729 from Dalai Felinto
Additional sculpt mode hotkeys to toggle Smooth stroke (Shift S) and Anchored brush (Shift A) . Menus are updated with hotkeys too. This is a real last minute one, but it was given the ok previously, and I've just had time to commit this for him.
-rw-r--r--source/blender/src/buttons_editing.c2
-rw-r--r--source/blender/src/header_view3d.c2
-rw-r--r--source/blender/src/space.c14
3 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 12dd8752133..4b3e8b1a056 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -5706,7 +5706,7 @@ void sculptmode_draw_interface_brush(uiBlock *block, unsigned short cx, unsigned
if(sd->brush_type == DRAW_BRUSH)
uiDefButC(block,NUM,B_NOP, "View", cx,cy,80,19, &sculptmode_brush()->view, 0,10,20,0,"Pulls brush direction towards view");
cy-= 20;
- uiDefButBitC(block, TOG, SCULPT_BRUSH_ANCHORED, B_NOP, "Anchored", cx,cy,80,19, &sculptmode_brush()->flag, 0,0,0,0, "Keep the brush center anchored to the initial location");
+ uiDefButBitC(block, TOG, SCULPT_BRUSH_ANCHORED, B_NOP, "Anchored", cx,cy,80,19, &sculptmode_brush()->flag, 0,0,0,0, "Keep the brush center anchored to the initial location (Shift A)");
uiBlockEndAlign(block);
/* Draw curve */
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index 4cef7a1cb3e..5c215dcdd46 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -4740,7 +4740,7 @@ uiBlock *view3d_sculpt_inputmenu(void *arg_unused)
block= uiNewBlock(&curarea->uiblocks, "view3d_sculpt_inputmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_view3d_sculpt_inputmenu, NULL);
- uiDefIconTextBut(block, BUTM, 1, ((sd->flags & SCULPT_INPUT_SMOOTH) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Smooth Stroke", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ((sd->flags & SCULPT_INPUT_SMOOTH) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT), "Smooth Stroke|Shift S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Tablet Size Adjust", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Tablet Strength Adjust", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 52a646a2c64..6cd573c580d 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -1523,7 +1523,10 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
/* Brush properties */
case AKEY:
- br->flag ^= SCULPT_BRUSH_AIRBRUSH;
+ if(G.qual==LR_SHIFTKEY)
+ br->flag ^= SCULPT_BRUSH_ANCHORED;
+ else
+ br->flag ^= SCULPT_BRUSH_AIRBRUSH;
update_prop= 1; break;
case FKEY:
if(ss) {
@@ -1541,8 +1544,13 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
sd->brush_type= DRAW_BRUSH;
update_prop= 1; break;
case SKEY:
- sd->brush_type= SMOOTH_BRUSH;
- update_prop= 1; break;
+ if(G.qual==LR_SHIFTKEY)
+ sd->flags ^= SCULPT_INPUT_SMOOTH;
+ else {
+ sd->brush_type= SMOOTH_BRUSH;
+ update_prop= 1;
+ }
+ break;
case PKEY:
sd->brush_type= PINCH_BRUSH;
update_prop= 1; break;