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:
authorPablo Dobarro <pablodp606@gmail.com>2019-11-22 20:21:03 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-11-22 20:21:44 +0300
commit71ddcf1a0883b21f3c37cde75b26514efd967484 (patch)
treebc3e30d0384f7d89338e7d8da0f4f04d15a9346d /source/blender/blenkernel/intern/brush.c
parent2ff1919b456b5c48bec8cb8914d2051e087e18e5 (diff)
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
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c3
1 files changed, 3 insertions, 0 deletions
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;