* Patch #17729 from Dalai Felinto
authorMatt Ebb <matt@mke3.net>
Sun, 12 Oct 2008 06:39:47 +0000 (06:39 +0000)
committerMatt Ebb <matt@mke3.net>
Sun, 12 Oct 2008 06:39:47 +0000 (06:39 +0000)
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.

source/blender/src/buttons_editing.c
source/blender/src/header_view3d.c
source/blender/src/space.c

index 12dd87521338c96de3280c63e76292a17b8e6f0c..4b3e8b1a05633f4e5cb36d50795682eae07425dc 100644 (file)
@@ -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 */
index 4cef7a1cb3ec12657d0b108c2e815ab35a9c2e29..5c215dcdd46153b938f3c10044c5045a94005f60 100644 (file)
@@ -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, "");
        
index 52a646a2c647b4add4b4361a41d96b3908f09fd5..6cd573c580ddf2be9c6e39db644a92bc1e7ee731 100644 (file)
@@ -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;