2.5/Sculpt:
authorNicholas Bishop <nicholasbishop@gmail.com>
Sun, 21 Jun 2009 03:34:30 +0000 (03:34 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Sun, 21 Jun 2009 03:34:30 +0000 (03:34 +0000)
Fix for the poll used for the operator to set the brush curve to a preset. The 3 brush curve presets in the Sculpt menu are now functional.

source/blender/editors/sculpt_paint/sculpt.c

index fa33e214737eb661667dce45f5c3982dc60aa4be..b61141ab62e18862b037e013828a491994fec4e9 100644 (file)
@@ -1192,6 +1192,11 @@ void sculptmode_draw_mesh(int only_damaged)
 }
 #endif
 
+static int sculpt_mode_poll(bContext *C)
+{
+       return G.f & G_SCULPTMODE;
+}
+
 static int sculpt_poll(bContext *C)
 {
        return G.f & G_SCULPTMODE && CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
@@ -1269,7 +1274,7 @@ static void SCULPT_OT_brush_curve_preset(wmOperatorType *ot)
        ot->idname= "SCULPT_OT_brush_curve_preset";
 
        ot->exec= sculpt_brush_curve_preset_exec;
-       ot->poll= sculpt_poll;
+       ot->poll= sculpt_mode_poll;
 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;