diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-06-10 14:32:11 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-06-10 14:32:28 +0300 |
commit | 9f911f62dcefd3ce4312bb8aa1d522cae6bbf6e9 (patch) | |
tree | 15729122676546f1b41a7b20f2255222d67ca7b9 /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | 6e844da9dad5bcbc1fb747879fa2a11715223d84 (diff) |
Fix T45013 negative curve falloff not working.
Was doing clamping as fix for T42984. Seems we can ommit clamping for
sculpting if we make sure overlap is not zero with negative values.
Control for clamping is moved to the "Use Clipping" function of curves
(which is on by default), so both bugs remain squashed and advanced
users can now properly utilize curves in sculpting, though not all
brushes work well with negative curves.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 1a31442faf4..5af327e7b49 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -936,7 +936,7 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const float co else { factor = 1.0f; } - return factor * BKE_brush_curve_strength(brush, dist, brush_size_pressure); + return factor * BKE_brush_curve_strength_clamped(brush, dist, brush_size_pressure); } } if (rgba) @@ -3217,7 +3217,7 @@ static void gradientVert_update(DMGradient_userData *grad_data, int index) /* no need to clamp 'alpha' yet */ /* adjust weight */ - alpha = BKE_brush_curve_strength(grad_data->brush, alpha, 1.0f); + alpha = BKE_brush_curve_strength_clamped(grad_data->brush, alpha, 1.0f); if (alpha != 0.0f) { MDeformVert *dv = &me->dvert[index]; |