diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 8 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e1f9abfdae7..9f60563dff7 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1421,11 +1421,11 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel): if gp_settings.gpencil_brush_type == 'ERASE': row = layout.row(align=True) row.prop(brush, "size", text="Radius") - row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') + row = layout.row(align=True) + row.prop(gp_settings, "pen_strength", slider=True) + row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') - col = layout.column(align=True) - col.separator() - row = col.row() + row = layout.row(align=True) row.prop(gp_settings, "eraser_mode", expand=True) elif gp_settings.gpencil_brush_type == 'FILL': col = layout.column(align=True) 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; } |