svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / blender / editors / space_view3d / view3d_buttons.c
index d7cb08db4142a8c38d95005c60f06f56cbbe95b4..915652355918201d7ec12d179d3e2889e16cb4dd 100644 (file)
@@ -1132,9 +1132,10 @@ static void view3d_panel_brush(const bContext *C, Panel *pa)
                uiDefButC(block,ROW,B_REDR,"Pinch",cx+134,cy,67,19,&br->sculpt_tool,14.0,SCULPT_TOOL_PINCH,0,0,"Interactively pinch areas of the model");
                uiDefButC(block,ROW,B_REDR,"Inflate",cx+201,cy,67,19,&br->sculpt_tool,14,SCULPT_TOOL_INFLATE,0,0,"Push vertices along the direction of their normals");
                cy-= 20;
-               uiDefButC(block,ROW,B_REDR,"Grab", cx,cy,89,19,&br->sculpt_tool,14,SCULPT_TOOL_GRAB,0,0,"Grabs a group of vertices and moves them with the mouse");
-               uiDefButC(block,ROW,B_REDR,"Layer", cx+89,cy,89,19,&br->sculpt_tool,14, SCULPT_TOOL_LAYER,0,0,"Adds a layer of depth");
-               uiDefButC(block,ROW,B_REDR,"Flatten", cx+178,cy,90,19,&br->sculpt_tool,14, SCULPT_TOOL_FLATTEN,0,0,"Interactively flatten areas of the model");
+               uiDefButC(block,ROW,B_REDR,"Grab", cx,cy,67,19,&br->sculpt_tool,14,SCULPT_TOOL_GRAB,0,0,"Grabs a group of vertices and moves them with the mouse");
+               uiDefButC(block,ROW,B_REDR,"Layer", cx+67,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_LAYER,0,0,"Adds a layer of depth");
+               uiDefButC(block,ROW,B_REDR,"Flatten", cx+134,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_FLATTEN,0,0,"Interactively flatten areas of the model");
+               uiDefButC(block,ROW,B_REDR,"Clay", cx+201,cy,67,19,&br->sculpt_tool,14, SCULPT_TOOL_CLAY,0,0,"Build up depth quickly");
                cy-= 25;
                uiBlockEndAlign(block);
        }
@@ -1157,11 +1158,13 @@ static void view3d_panel_brush(const bContext *C, Panel *pa)
        cy-= 20;
        uiBlockEndAlign(block);
 
-       rect.xmin= cx; rect.xmax= cx + w;
-       rect.ymin= cy - 200; rect.ymax= cy;
-       uiBlockBeginAlign(block);
-       curvemap_buttons(block, br->curve, (char)0, B_NOP, 0, &rect);
-       uiBlockEndAlign(block);
+       if(br->curve) {
+               rect.xmin= cx; rect.xmax= cx + w;
+               rect.ymin= cy - 200; rect.ymax= cy;
+               uiBlockBeginAlign(block);
+               curvemap_buttons(block, br->curve, (char)0, B_NOP, 0, &rect);
+               uiBlockEndAlign(block);
+       }
 }
 
 static void sculptmode_draw_interface_tools(Scene *scene, uiBlock *block, unsigned short cx, unsigned short cy)
@@ -1660,7 +1663,7 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
 
        uiBlockEndAlign(block);
        
-       uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->snap_flag, 0, 0, 0, 0, "Peel whole objects as one");
+       uiDefButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_NOP, "Peel Objects", 10, yco, 200, 20, &scene->toolsettings->snap_flag, 0, 0, 0, 0, "Peel whole objects as one");
 }
 
 
@@ -1707,7 +1710,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
        }
        
        RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
-       uiDefAutoButsRNA(C, pa->layout, &ptr);
+       uiDefAutoButsRNA(C, pa->layout, &ptr, 2);
 }
 
 void view3d_buttons_register(ARegionType *art)