[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54833] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: fix for weight paint using values over 1.0 when blending,
Campbell Barton
ideasman42 at gmail.com
Mon Feb 25 04:45:57 CET 2013
Revision: 54833
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54833
Author: campbellbarton
Date: 2013-02-25 03:45:56 +0000 (Mon, 25 Feb 2013)
Log Message:
-----------
fix for weight paint using values over 1.0 when blending,
since its possible to have a brush strength over 1.0, it was possible to paint weights which would over-shoot the intended weight.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2013-02-25 02:49:45 UTC (rev 54832)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2013-02-25 03:45:56 UTC (rev 54833)
@@ -913,7 +913,8 @@
BLI_INLINE float wval_blend(const float weight, const float paintval, const float alpha)
{
- return (paintval * alpha) + (weight * (1.0f - alpha));
+ const float talpha = min_ff(alpha, 1.0f); /* blending with values over 1 doesn't make sense */
+ return (paintval * talpha) + (weight * (1.0f - talpha));
}
BLI_INLINE float wval_add(const float weight, const float paintval, const float alpha)
{
More information about the Bf-blender-cvs
mailing list