From 71ddcf1a0883b21f3c37cde75b26514efd967484 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 22 Nov 2019 18:21:03 +0100 Subject: Paint: Smoother curve preset This implements a 5th-order equation smoothstep, which produces a flat surface at the brush center. Some users find that our current grab brush is too sharp, so now we have both options. This also improves the behavior of the new clay brushes. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6265 --- source/blender/blenkernel/intern/brush.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/intern/brush.c') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 8ba1aa20a26..4d496fe758b 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1576,6 +1576,9 @@ float BKE_brush_curve_strength(const Brush *br, float p, const float len) case BRUSH_CURVE_SMOOTH: strength = 3.0f * p * p - 2.0f * p * p * p; break; + case BRUSH_CURVE_SMOOTHER: + strength = pow3f(p) * (p * (p * 6.0f - 15.0f) + 10.0f); + break; case BRUSH_CURVE_ROOT: strength = sqrtf(p); break; -- cgit v1.2.3