- jitter for painting (image and projection painting, others can be added)
authorCampbell Barton <ideasman42@gmail.com>
Fri, 18 Sep 2009 11:25:52 +0000 (11:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 18 Sep 2009 11:25:52 +0000 (11:25 +0000)
- remove falloff setting now the curve is used.
- bugfix for airbrush & tablet, with no movement it would assume 1.0 pressure.
- rna, use the use_* prefix for brush options.

release/ui/space_image.py
release/ui/space_view3d.py
release/ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/brush.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_image/image_buttons.c
source/blender/makesdna/DNA_brush_types.h
source/blender/makesrna/intern/rna_brush.c

index 161e291..50ccda3 100644 (file)
@@ -412,7 +412,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
                row.template_list(settings, "brushes", settings, "active_brush_index", rows=2)
                        
                col.template_ID(settings, "brush", new="brush.add")
-                
+
                row = layout.row(align=True)
                row.item_enumR(settings, "tool", 'DRAW')
                row.item_enumR(settings, "tool", 'SOFTEN')
@@ -424,12 +424,16 @@ class IMAGE_PT_paint(bpy.types.Panel):
 
                row = col.row(align=True)
                row.itemR(brush, "size", slider=True)
-               row.itemR(brush, "size_pressure", toggle=True, text="")
+               row.itemR(brush, "use_size_pressure", toggle=True, text="")
                
                row = col.row(align=True)
                row.itemR(brush, "strength", slider=True)
-               row.itemR(brush, "strength_pressure", toggle=True, text="")
-               
+               row.itemR(brush, "use_strength_pressure", toggle=True, text="")
+
+               row = col.row(align=True)
+               row.itemR(brush, "jitter", slider=True)
+               row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
+
                col.itemR(brush, "blend", text="Blend")
 
 class IMAGE_PT_paint_stroke(bpy.types.Panel):
@@ -448,16 +452,16 @@ class IMAGE_PT_paint_stroke(bpy.types.Panel):
                settings = context.tool_settings.image_paint
                brush = settings.brush
 
-               layout.itemR(brush, "airbrush")
+               layout.itemR(brush, "use_airbrush")
                col = layout.column()
-               col.active = brush.airbrush
+               col.active = brush.use_airbrush
                col.itemR(brush, "rate", slider=True)
 
-               layout.itemR(brush, "space")
+               layout.itemR(brush, "use_space")
                row = layout.row(align=True)
-               row.active = brush.space
+               row.active = brush.use_space
                row.itemR(brush, "spacing", text="Distance", slider=True)
-               row.itemR(brush, "spacing_pressure", toggle=True, text="")      
+               row.itemR(brush, "use_spacing_pressure", toggle=True, text="")  
 
 class IMAGE_PT_paint_curve(bpy.types.Panel):
        __space_type__ = 'IMAGE_EDITOR'
index 62b7fa0..fd06853 100644 (file)
@@ -539,16 +539,16 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
                layout.itemS()
                
                if brush.sculpt_tool != 'GRAB':
-                       layout.itemR(brush, "airbrush")
+                       layout.itemR(brush, "use_airbrush")
                        
                        if brush.sculpt_tool != 'LAYER':
-                               layout.itemR(brush, "anchored")
+                               layout.itemR(brush, "use_anchor")
                        
                        if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
                                layout.itemR(brush, "flip_direction")
 
                        if brush.sculpt_tool == 'LAYER':
-                               layout.itemR(brush, "persistent")
+                               layout.itemR(brush, "use_persistent")
                                layout.itemO("sculpt.set_persistent_base")
 
 # ********** Particle menu **********  
index 09e85bf..6f17ad9 100644 (file)
@@ -387,13 +387,18 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                        
                        row = col.row(align=True)
                        row.itemR(brush, "size", slider=True)
-                       row.itemR(brush, "size_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_size_pressure", toggle=True, text="")
                        
                        if brush.sculpt_tool != 'GRAB':
                                row = col.row(align=True)
                                row.itemR(brush, "strength", slider=True)
-                               row.itemR(brush, "strength_pressure", text="")
-                       
+                               row.itemR(brush, "use_strength_pressure", text="")
+                               
+                               ''' # XXX - TODO
+                               row = col.row(align=True)
+                               row.itemR(brush, "jitter", slider=True)
+                               row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
+                               '''
                                col = layout.column()
 
                                if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
@@ -419,11 +424,15 @@ class VIEW3D_PT_tools_brush(PaintPanel):
 
                        row = col.row(align=True)
                        row.itemR(brush, "size", slider=True)
-                       row.itemR(brush, "size_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_size_pressure", toggle=True, text="")
                        
                        row = col.row(align=True)
                        row.itemR(brush, "strength", slider=True)
-                       row.itemR(brush, "strength_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_strength_pressure", toggle=True, text="")
+                       
+                       row = col.row(align=True)
+                       row.itemR(brush, "jitter", slider=True)
+                       row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
                        
                        col.itemR(brush, "blend", text="Blend")
                
@@ -435,11 +444,15 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                        col = layout.column()
                        row = col.row(align=True)
                        row.itemR(brush, "size", slider=True)
-                       row.itemR(brush, "size_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_size_pressure", toggle=True, text="")
                        
                        row = col.row(align=True)
                        row.itemR(brush, "strength", slider=True)
-                       row.itemR(brush, "strength_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_strength_pressure", toggle=True, text="")
+                       
+                       row = col.row(align=True)
+                       row.itemR(brush, "jitter", slider=True)
+                       row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
                
                # Vertex Paint Mode #
                
@@ -449,11 +462,17 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                        
                        row = col.row(align=True)
                        row.itemR(brush, "size", slider=True)
-                       row.itemR(brush, "size_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_size_pressure", toggle=True, text="")
                        
                        row = col.row(align=True)
                        row.itemR(brush, "strength", slider=True)
-                       row.itemR(brush, "strength_pressure", toggle=True, text="")
+                       row.itemR(brush, "use_strength_pressure", toggle=True, text="")
+                       
+                       ''' # XXX - TODO
+                       row = col.row(align=True)
+                       row.itemR(brush, "jitter", slider=True)
+                       row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
+                       '''
 
 class VIEW3D_PT_tools_brush_stroke(PaintPanel):
        __label__ = "Stroke"
@@ -475,27 +494,27 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel):
 
                if context.sculpt_object:
                        if brush.sculpt_tool != 'LAYER':
-                               layout.itemR(brush, "anchored")
-                       layout.itemR(brush, "rake")
+                               layout.itemR(brush, "use_anchor")
+                       layout.itemR(brush, "use_rake")
 
-               layout.itemR(brush, "airbrush")
+               layout.itemR(brush, "use_airbrush")
                col = layout.column()
-               col.active = brush.airbrush
+               col.active = brush.use_airbrush
                col.itemR(brush, "rate", slider=True)
 
                if not texture_paint:
-                       layout.itemR(brush, "smooth_stroke")
+                       layout.itemR(brush, "use_smooth_stroke")
                        col = layout.column()
-                       col.active = brush.smooth_stroke
+                       col.active = brush.use_smooth_stroke
                        col.itemR(brush, "smooth_stroke_radius", text="Radius", slider=True)
                        col.itemR(brush, "smooth_stroke_factor", text="Factor", slider=True)
 
-               layout.itemR(brush, "space")
+               layout.itemR(brush, "use_space")
                row = layout.row(align=True)
-               row.active = brush.space
+               row.active = brush.use_space
                row.itemR(brush, "spacing", text="Distance", slider=True)
                if texture_paint:
-                       row.itemR(brush, "spacing_pressure", toggle=True, text="")      
+                       row.itemR(brush, "use_spacing_pressure", toggle=True, text="")  
 
 class VIEW3D_PT_tools_brush_curve(PaintPanel):
        __label__ = "Curve"
index 2e88dc2..6c3c973 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "BLI_arithb.h"
 #include "BLI_blenlib.h"
+#include "BLI_rand.h"
 
 #include "BKE_brush.h"
 #include "BKE_colortools.h"
@@ -78,7 +79,7 @@ Brush *add_brush(const char *name)
        brush->smooth_stroke_radius= 75;
        brush->smooth_stroke_factor= 0.9;
        brush->rate= 0.1f;
-       brush->innerradius= 0.5f;
+       brush->jitter= 0.0f;
        brush->clone.alpha= 0.5;
        brush->sculpt_tool = SCULPT_TOOL_DRAW;
 
@@ -513,7 +514,7 @@ typedef struct BrushPainterCache {
 
        int lastsize;
        float lastalpha;
-       float lastinnerradius;
+       float lastjitter;
 
        ImBuf *ibuf;
        ImBuf *texibuf;
@@ -538,7 +539,7 @@ struct BrushPainter {
 
        float startsize;
        float startalpha;
-       float startinnerradius;
+       float startjitter;
        float startspacing;
 
        BrushPainterCache cache;
@@ -554,7 +555,7 @@ BrushPainter *brush_painter_new(Brush *brush)
 
        painter->startsize = brush->size;
        painter->startalpha = brush->alpha;
-       painter->startinnerradius = brush->innerradius;
+       painter->startjitter = brush->jitter;
        painter->startspacing = brush->spacing;
 
        return painter;
@@ -588,7 +589,7 @@ void brush_painter_free(BrushPainter *painter)
 
        brush->size = painter->startsize;
        brush->alpha = painter->startalpha;
-       brush->innerradius = painter->startinnerradius;
+       brush->jitter = painter->startjitter;
        brush->spacing = painter->startspacing;
 
        if (painter->cache.ibuf) IMB_freeImBuf(painter->cache.ibuf);
@@ -744,7 +745,7 @@ static void brush_painter_refresh_cache(BrushPainter *painter, float *pos)
        short flt;
 
        if ((brush->size != cache->lastsize) || (brush->alpha != cache->lastalpha)
-           || (brush->innerradius != cache->lastinnerradius)) {
+           || (brush->jitter != cache->lastjitter)) {
                if (cache->ibuf) {
                        IMB_freeImBuf(cache->ibuf);
                        cache->ibuf= NULL;
@@ -769,7 +770,7 @@ static void brush_painter_refresh_cache(BrushPainter *painter, float *pos)
 
                cache->lastsize= brush->size;
                cache->lastalpha= brush->alpha;
-               cache->lastinnerradius= brush->innerradius;
+               cache->lastjitter= brush->jitter;
        }
        else if ((brush->flag & BRUSH_FIXED_TEX) && mtex && mtex->tex) {
                int dx = (int)painter->lastpaintpos[0] - (int)pos[0];
@@ -791,20 +792,34 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres
                brush->alpha = MAX2(0.0, painter->startalpha*pressure);
        if (brush->flag & BRUSH_SIZE_PRESSURE)
                brush->size = MAX2(1.0, painter->startsize*pressure);
-       if (brush->flag & BRUSH_RAD_PRESSURE)
-               brush->innerradius = MAX2(0.0, painter->startinnerradius*pressure);
+       if (brush->flag & BRUSH_JITTER_PRESSURE)
+               brush->jitter = MAX2(0.0, painter->startjitter*pressure);
        if (brush->flag & BRUSH_SPACING_PRESSURE)
                brush->spacing = MAX2(1.0, painter->startspacing*(1.5f-pressure));
 }
 
+static void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
+{
+       if(brush->jitter){
+               jitterpos[0] = pos[0] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
+               jitterpos[1] = pos[1] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
+       }
+       else {
+               VECCOPY2D(jitterpos, pos);
+       }
+}
+
 int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
 {
        Brush *brush= painter->brush;
        int totpaintops= 0;
 
-       if (pressure == 0.0f)
-               pressure = 1.0f;        /* zero pressure == not using tablet */
-
+       if (pressure == 0.0f) {
+               if(painter->lastpressure) // XXX - hack, operator misses
+                       pressure= painter->lastpressure;
+               else
+                       pressure = 1.0f;        /* zero pressure == not using tablet */
+       }
        if (painter->firsttouch) {
                /* paint exactly once on first touch */
                painter->startpaintpos[0]= pos[0];
@@ -855,7 +870,7 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
        }
 #endif
        else {
-               float startdistance, spacing, step, paintpos[2], dmousepos[2];
+               float startdistance, spacing, step, paintpos[2], dmousepos[2], finalpos[2];
                float t, len, press;
 
                /* compute brush spacing adapted to brush size, spacing may depend
@@ -880,11 +895,13 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
                        brush_apply_pressure(painter, brush, press);
                        spacing= MAX2(1.0f, brush->size)*brush->spacing*0.01f;
 
+                       brush_jitter_pos(brush, paintpos, finalpos);
+
                        if (painter->cache.enabled)
-                               brush_painter_refresh_cache(painter, paintpos);
+                               brush_painter_refresh_cache(painter, finalpos);
 
                        totpaintops +=
-                               func(user, painter->cache.ibuf, painter->lastpaintpos, paintpos);
+                               func(user, painter->cache.ibuf, painter->lastpaintpos, finalpos);
 
                        painter->lastpaintpos[0]= paintpos[0];
                        painter->lastpaintpos[1]= paintpos[1];
@@ -907,10 +924,14 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
 
                        while (painter->accumtime >= brush->rate) {
                                brush_apply_pressure(painter, brush, pressure);
+
+                               brush_jitter_pos(brush, pos, finalpos);
+
                                if (painter->cache.enabled)
-                                       brush_painter_refresh_cache(painter, paintpos);
+                                       brush_painter_refresh_cache(painter, finalpos);
+
                                totpaintops +=
-                                       func(user, painter->cache.ibuf, painter->lastmousepos, pos);
+                                       func(user, painter->cache.ibuf, painter->lastmousepos, finalpos);
                                painter->accumtime -= brush->rate;
                        }
 
@@ -924,7 +945,7 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
 
        brush->alpha = painter->startalpha;
        brush->size = painter->startsize;
-       brush->innerradius = painter->startinnerradius;
+       brush->jitter = painter->startjitter;
        brush->spacing = painter->startspacing;
 
        return totpaintops;
index e8dd27f..0d83cef 100644 (file)
@@ -4443,6 +4443,7 @@ typedef struct PaintOperation {
 
        int first;
        int prevmouse[2];
+       float prev_pressure; /* need this since we dont get tablet events for pressure change */
        int brush_size_orig;
        double starttime;
 
@@ -4722,8 +4723,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
                if(wmtab->Active == EVT_TABLET_ERASER)
                        pop->s.blend= IMB_BLEND_ERASE_ALPHA;
        }
-       else
-               pressure= 1.0f;
+       else /* otherwise airbrush becomes 1.0 pressure instantly */
+               pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f;
 
        if(pop->first) {
                pop->prevmouse[0]= mouse[0];
@@ -4732,8 +4733,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
 
                /* special exception here for too high pressure values on first touch in
                   windows for some tablets, then we just skip first touch ..  */
-               if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|
-                       BRUSH_SPACING_PRESSURE|BRUSH_RAD_PRESSURE)) && tablet && (pressure >= 0.99f))
+               if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|BRUSH_SPACING_PRESSURE)) && tablet && (pressure >= 0.99f))
                        return;
        }
 
@@ -4748,6 +4748,8 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
 
        /* apply */
        paint_apply(C, op, &itemptr);
+
+       pop->prev_pressure= pressure;
 }
 
 static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event)
index 7868795..bdf3e94 100644 (file)
@@ -453,8 +453,8 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
                uiDefIconButBitS(block, TOG|BIT, BRUSH_ALPHA_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE,   180,yco-20,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
                uiDefButI(block, NUMSLI, evt_nop, "Size ",              0,yco-40,180,19, &brush->size, 1, 200, 0, 0, "The size of the brush");
                uiDefIconButBitS(block, TOG|BIT, BRUSH_SIZE_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE,    180,yco-40,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
-               uiDefButF(block, NUMSLI, evt_nop, "Falloff ",           0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
-               uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE,     180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+//             uiDefButF(block, NUMSLI, evt_nop, "Falloff ",           0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
+//             uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE,     180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
                uiDefButF(block, NUMSLI, evt_nop, "Spacing ",0,yco-80,180,19, &brush->spacing, 1.0, 100.0, 0, 0, "Repeating paint on %% of brush diameter");
                uiDefIconButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
                uiBlockEndAlign(block);
index a3a1a34..1bbccd2 100644 (file)
@@ -56,7 +56,7 @@ typedef struct Brush {
        
        short flag, blend;                      /* general purpose flag, blend mode */
        int size;                                       /* brush diameter */
-       float innerradius;                      /* inner radius after which the falloff starts */
+       float jitter;                           /* jitter the position of the brush */
        float spacing;                          /* spacing of paint operations */
        int smooth_stroke_radius;               /* turning radius (in pixels) for smooth stroke */
        float smooth_stroke_factor;             /* higher values limit fast changes in the stroke direction */
@@ -76,7 +76,7 @@ typedef struct Brush {
 #define BRUSH_TORUS                            2
 #define BRUSH_ALPHA_PRESSURE   4
 #define BRUSH_SIZE_PRESSURE            8
-#define BRUSH_RAD_PRESSURE             16
+#define BRUSH_JITTER_PRESSURE  16 /* was BRUSH_RAD_PRESSURE */
 #define BRUSH_SPACING_PRESSURE 32
 #define BRUSH_FIXED_TEX                        64
 #define BRUSH_RAKE             128
index eea2938..1512579 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * Contributor(s): Blender Foundation (2008), Juho Vepsäläinen
+ * Contributor(s): Blender Foundation (2008), Juho Veps�l�inen
  *
  * ***** END GPL LICENSE BLOCK *****
  */
@@ -133,11 +133,11 @@ static void rna_def_brush(BlenderRNA *brna)
        RNA_def_property_range(prop, 1, 200);
        RNA_def_property_ui_text(prop, "Size", "Diameter of the brush.");
        
-       prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "innerradius");
+       prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
+       RNA_def_property_float_sdna(prop, NULL, "jitter");
        RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "Falloff", "Falloff radius of the brush.");
-       
+       RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting.");
+
        prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "spacing");
        RNA_def_property_range(prop, 1.0f, 100.0f);
@@ -166,51 +166,51 @@ static void rna_def_brush(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush.");
 
        /* flag */
-       prop= RNA_def_property(srna, "airbrush", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
        RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray).");
        
-       prop= RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
        RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting.");
        
-       prop= RNA_def_property(srna, "strength_pressure", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
        RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
        RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
        
-       prop= RNA_def_property(srna, "size_pressure", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_size_pressure", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
        RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
        RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size.");
        
-       prop= RNA_def_property(srna, "falloff_pressure", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAD_PRESSURE);
+       prop= RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE);
        RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
-       RNA_def_property_ui_text(prop, "Falloff Pressure", "Enable tablet pressure sensitivity for falloff.");
-       
-       prop= RNA_def_property(srna, "spacing_pressure", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter.");
+
+       prop= RNA_def_property(srna, "use_spacing_pressure", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
        RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
        RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing.");
 
-       prop= RNA_def_property(srna, "rake", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAKE);
        RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction.");
 
-       prop= RNA_def_property(srna, "anchored", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
        RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location.");
 
-       prop= RNA_def_property(srna, "space", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_space", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE);
        RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing.");
 
-       prop= RNA_def_property(srna, "smooth_stroke", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
        RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path.");
 
-       prop= RNA_def_property(srna, "persistent", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
        RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh.");