[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58805] trunk/blender/source/blender/ editors/sculpt_paint/paint_stroke.c: Fix a very irritating problem of our stroke system.

Antony Riakiotakis kalast at gmail.com
Thu Aug 1 19:14:20 CEST 2013


Revision: 58805
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58805
Author:   psy-fi
Date:     2013-08-01 17:14:20 +0000 (Thu, 01 Aug 2013)
Log Message:
-----------
Fix a very irritating problem of our stroke system. On small brushes,
the space stroke would be repeated on unneeded subpixel precision. Since
this is not really useful, enforce spacing to be at least one pixel.
This makes small brushes quite more responsive.

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

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-08-01 16:34:55 UTC (rev 58804)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-08-01 17:14:20 UTC (rev 58805)
@@ -375,13 +375,13 @@
 
 	/* apply spacing pressure */
 	if (stroke->brush->flag & BRUSH_SPACING_PRESSURE)
-		spacing = max_ff(1.0f, spacing * (1.5f - spacing_pressure));
+		spacing = spacing * (1.5f - spacing_pressure);
 
 	/* stroke system is used for 2d paint too, so we need to account for
 	 * the fact that brush can be scaled there. */
 	spacing *= stroke->zoom_2d;
 
-	return (size_clamp * spacing / 50.0f);
+	return max_ff(1.0, size_clamp * spacing / 50.0f);
 }
 
 static float paint_space_stroke_spacing_variable(const Scene *scene, PaintStroke *stroke, float pressure, float dpressure, float length)




More information about the Bf-blender-cvs mailing list