Merge 16964:17122
[blender.git] / source / blender / src / space.c
index 94ba10cca4aa7fa30e80fe1ed876fc1de58174a9..71c31fea209f043266bf281f9b568d2c2aa63025 100644 (file)
@@ -226,7 +226,7 @@ void add_blockhandler(ScrArea *sa, short eventcode, short val)
                }
        }
        if(a==SPACE_MAXHANDLER) {
-               error("Only %i floating panels allowed", SPACE_MAXHANDLER-1);
+               error("Only %i floating panels allowed", SPACE_MAXHANDLER/2);
        }
                
 }
@@ -1529,7 +1529,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) {
@@ -1547,8 +1550,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;
@@ -4143,14 +4151,22 @@ void drawinfospace(ScrArea *sa, void *spacedata)
                        (xpos+(5*midsp)+(3*mpref)+(spref*2.5)),y5,(spref*1.5),buth,
                        &(U.gp_euclideandist), 0, 100, 0, 0, "Distance moved by mouse when drawing stroke (in pixels) to include");
                
-               
-               uiDefButS(block, NUM, 0, "Eraser Radius:",
-                       (xpos+(7*midsp)+(3*mpref)+(3.75*spref)),y5,spref*1.5,buth,
-                       &(U.gp_eraser), 0, 100, 0, 0, "Radius of eraser 'brush'");
                uiDefButBitS(block, TOG, GP_PAINT_DOSMOOTH, 0,"Smooth Stroke",
-                       (xpos+(8*midsp)+(3*mpref)+(5*spref)),y5,spref,buth,
+                       (xpos+(4*midsp)+(3*mpref)+spref),y4,(spref*1.5),buth,
                        &(U.gp_settings), 0, 100, 0, 0, "Smooth the final stroke");
+                       
+               // currently hidden behind G.rt, as it is not that useful yet
+               if (G.rt) {
+                       uiDefButBitS(block, TOG, GP_PAINT_DOSIMPLIFY, 0,"Simplify Stroke",
+                               (xpos+(5*midsp)+(3*mpref)+(spref*2.5)),y4,(spref*1.5),buth,
+                               &(U.gp_settings), 0, 100, 0, 0, "Simplify the final stroke");
+               }
                uiBlockEndAlign(block);
+               
+               uiDefButS(block, NUM, 0, "Eraser Radius:",
+                       (xpos+(7*midsp)+(3*mpref)+(4*spref)),y5,mpref,buth,
+                       &(U.gp_eraser), 0, 100, 0, 0, "Radius of eraser 'brush'");
+               
        
        } else if(U.userpref == 2) { /* language & colors */