diff options
author | Pablo Dobarro <pablodp606> | 2020-09-02 23:33:05 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-02 23:33:24 +0300 |
commit | 89cdf4f75dd0f2d7cfd993cff7797371b73627d0 (patch) | |
tree | 635dabf651c5967daea19df8f1888a781c18bc93 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | fb09bc3c35b7544c46c13cc322421419948a3d52 (diff) |
Fix Cloth Snake Hook brush not using pressure
The Snake Hook deformation mode was using the same strength as grab (not
supporting pressure), but this deformation mode supports pressure.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8724
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7cb4f74282b..1078e97e7cf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2273,10 +2273,13 @@ static float brush_strength(const Sculpt *sd, case SCULPT_TOOL_DISPLACEMENT_ERASER: return alpha * pressure * overlap * feather; case SCULPT_TOOL_CLOTH: - if (ELEM(brush->cloth_deform_type, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_SNAKE_HOOK)) { + if (brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB) { /* Grab deform uses the same falloff as a regular grab brush. */ return root_alpha * feather; } + else if (brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_SNAKE_HOOK) { + return root_alpha * feather * pressure * overlap; + } else if (brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_EXPAND) { /* Expand is more sensible to strength as it keeps expanding the cloth when sculpting over * the same vertices. */ |