[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30626] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: 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

Tom Musgrove LetterRip at gmail.com
Thu Jul 22 12:56:28 CEST 2010


Revision: 30626
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30626
Author:   letterrip
Date:     2010-07-22 12:56:27 +0200 (Thu, 22 Jul 2010)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2010-07-22 10:44:36 UTC (rev 30625)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c	2010-07-22 10:56:27 UTC (rev 30626)
@@ -4829,6 +4829,11 @@
 		   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 */





More information about the Bf-blender-cvs mailing list