diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-13 19:34:34 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-13 19:34:34 +0300 |
commit | d6f896da22649551f7115531b1a37c13e0c071a3 (patch) | |
tree | 03d7a006df2df3a22a6a0844da5fb868b3f48889 /source | |
parent | 74a3519a15e27b139bd5e07ea5b7e6e8962d276a (diff) |
GP: Add strength factor for eraser brush
This gives more control.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index dcee4c06132..1aea1e467b0 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1307,11 +1307,13 @@ static float gp_stroke_eraser_calc_influence(tGPsdata *p, const int mval[2], con CLAMP(distance, 0.0f, (float)radius); fac = 1.0f - (distance / (float)radius); + /* apply strength factor */ + fac *= brush->gpencil_settings->draw_strength; + /* Control this further using pen pressure */ if (brush->gpencil_settings->flag & GP_BRUSH_USE_PRESSURE) { fac *= p->pressure; } - /* Return influence factor computed here */ return fac; } |