From 89cdf4f75dd0f2d7cfd993cff7797371b73627d0 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Wed, 2 Sep 2020 22:33:05 +0200 Subject: [PATCH] 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 --- source/blender/editors/sculpt_paint/sculpt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. */