diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-11 22:04:41 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-11 22:11:44 +0300 |
commit | 6ee6a42d10e3c1c0868d1f038401d525264a7e24 (patch) | |
tree | e91a6b00bfa493300c99d3e274ba0e5493ad596c /source/blender/blenkernel | |
parent | 0ab7e321585f909a4fd3cc55221bf3d3827989e9 (diff) |
Sculpt: Clay Strips Tip Roundness property
This patch allow to change the brush tip shape between a square and a
circle using a brush property.
After this change we are no longer testing the distance against a cube
(the Z axis is not used). I did not test this in depth, but if it does
not produce any artifacts I think we can keep it this way instead of
adding more complexity to the code.
In this new distance test the brush falloff is only applied on the
rounded parts of the square to avoid sharp artifacts in the
diagonals. Because of this, the round version is much softer than
the square one. The planned hardness property will fix this, but
this can also be avoided by setting the fallof to a custom curve.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6165
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index effb3002630..69831f33ce5 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -949,9 +949,10 @@ void BKE_brush_sculpt_reset(Brush *br) br->flag |= BRUSH_ACCUMULATE | BRUSH_SIZE_PRESSURE; br->flag &= ~BRUSH_SPACE_ATTEN; br->alpha = 0.6f; + br->spacing = 5; br->normal_radius_factor = 1.55f; - br->curve_preset = BRUSH_CURVE_SPHERE; - br->spacing = 6; + br->tip_roundness = 0.18f; + br->curve_preset = BRUSH_CURVE_SMOOTHER; break; case SCULPT_TOOL_MULTIPLANE_SCRAPE: br->flag2 |= BRUSH_MULTIPLANE_SCRAPE_DYNAMIC | BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 2ec04ee2747..e2080f04d3a 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -391,7 +391,7 @@ void BKE_curvemap_reset(CurveMap *cuma, const rctf *clipr, int preset, int slope cuma->curve[6].y = 0.025f; break; case CURVE_PRESET_BELL: - cuma->curve[0].x = 0; + cuma->curve[0].x = 0.0f; cuma->curve[0].y = 0.025f; cuma->curve[1].x = 0.50f; |