diff options
author | Tom Musgrove <LetterRip@gmail.com> | 2010-07-22 14:56:27 +0400 |
---|---|---|
committer | Tom Musgrove <LetterRip@gmail.com> | 2010-07-22 14:56:27 +0400 |
commit | 97f91ed3fab6d43ab4887ce7892254d17d8915a9 (patch) | |
tree | d758bbee00d435d9fd030be61b57b8cf1262d977 /source/blender | |
parent | 617711f7bf01e9846d97c6dc748606b8a207760f (diff) |
this fixes the bug that occurs when using pen tablet controlled pressure and the first daub is at maximum pressure - the bug is actually in brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user) according to brecht, but 'seems more complicated than expected to properly fix this' so this work around has been approved
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index ef8c33007a2..776c884d79e 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4829,6 +4829,11 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) windows for some tablets, then we just skip first touch .. */ if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|BRUSH_SPACING_PRESSURE)) && tablet && (pressure >= 0.99f)) return; + + /* at zero pressure we should do nothing 1/2^12 is .0002 which is the sensitivity of the most sensitive pen tablet available*/ + if ((pop->s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE|BRUSH_SPACING_PRESSURE)) && tablet && (pressure <= 0.0002f)) + return; + } /* fill in stroke */ |