diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-01-20 18:13:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-01-20 18:13:35 +0300 |
commit | c0b4d42a5321fafba426b413ec74f73b6b193818 (patch) | |
tree | 23de0de1edabc06345bbc4282383e1bb0acbb713 /source/blender/src/imagepaint.c | |
parent | 38375784dfa61b8dd8224fab1530c321fb30bd69 (diff) |
Attempted fix for bug #5584:
Image painting: in Windows the first pressure value can be too high for
some tablets. Now it ignores that first value if it is >= 0.99. I'm not
sure if this is always the case here, so needs further testing.
Diffstat (limited to 'source/blender/src/imagepaint.c')
-rw-r--r-- | source/blender/src/imagepaint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c index 7bc6f5d88f6..f7a14e4736a 100644 --- a/source/blender/src/imagepaint.c +++ b/source/blender/src/imagepaint.c @@ -704,7 +704,11 @@ void imagepaint_paint(short mousebutton, short texpaint) prevmval[1]= mval[1]; s.blend = (td && td->Active == 2)? BRUSH_BLEND_ERASE_ALPHA: s.brush->blend; - imapaint_paint_stroke(&s, painter, texpaint, prevmval, mval, time, pressure); + /* special exception here for too high pressure values on first touch in + windows for some tablets */ + if (!((s.brush->flag & (BRUSH_ALPHA_PRESSURE|BRUSH_SIZE_PRESSURE| + BRUSH_SPACING_PRESSURE|BRUSH_RAD_PRESSURE)) && td && pressure >= 0.99f)) + imapaint_paint_stroke(&s, painter, texpaint, prevmval, mval, time, pressure); /* paint loop */ do { |