Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-08-01 21:14:20 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-08-01 21:14:20 +0400
commit6fe4ec1bdc4f8ef147e8d7db15162872004130da (patch)
tree65a82ff34fde1b1da4bca96154b15879bdf9e329 /source/blender
parent7eeaefb97ccf49d5a2cb801766fe765722e533b7 (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 576bbecb561..36e1b1feb38 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -375,13 +375,13 @@ static float paint_space_stroke_spacing(const Scene *scene, PaintStroke *stroke,
/* 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)