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
This commit is contained in:
parent
fb09bc3c35
commit
89cdf4f75d
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue