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:
-rw-r--r--source/blender/blenkernel/intern/brush.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 2a0256da34c..2e88dc2158c 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -933,8 +933,10 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
/* Uses the brush curve control to find a strength value between 0 and 1 */
float brush_curve_strength(Brush *br, float p, const float len)
{
+ float f;
if(p > len) p= len;
- return curvemapping_evaluateF(br->curve, 0, p/len);
+ f= curvemapping_evaluateF(br->curve, 0, p/len);
+ return (f > 0.0f) ? f:0.0f;
}
/* TODO: should probably be unified with BrushPainter stuff? */