[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23328] trunk/blender/source/blender/ blenkernel/intern/brush.c: curve could return values lower then zero, making a brush add and subtract the color in different parts.
Campbell Barton
ideasman42 at gmail.com
Fri Sep 18 06:07:43 CEST 2009
Revision: 23328
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23328
Author: campbellbarton
Date: 2009-09-18 06:07:41 +0200 (Fri, 18 Sep 2009)
Log Message:
-----------
curve could return values lower then zero, making a brush add and subtract the color in different parts. (cool but not useful!)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/brush.c
Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:47:17 UTC (rev 23327)
+++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 04:07:41 UTC (rev 23328)
@@ -933,8 +933,10 @@
/* 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? */
More information about the Bf-blender-cvs
mailing list