Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-05-19 01:00:21 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-05-26 21:48:46 +0300
commit18f33f293bfe08e87c50cad4a9d628592d7a3d15 (patch)
tree54e35573245a6dc0b8f238b5b4e66f739ead011e /source/blender/editors/sculpt_paint/paint_stroke.c
parent9aea7dc7c65b94aff0dda299c7269a252bf04b05 (diff)
Fix Cloth Brush grab deformation mode
The grab mode was not correctly implemented, so the way it was working was confusing for users. - Grab delta was calculated in increments from the last stroke position, so it did not match the behavior of a grab brush. I refactored the grab delta calculation to make this change more explicit. - Grab displacement was not calculated from the original coordinates - Grab was using an incorrect strength Grab is now setting the position of the affected vertices directly and the constraints solve the rest of the cloth. I also tried to implement an alternative version based on applying forces to move the vertices to the grab position, but I think this is more controllable and the grab falloff can be adjusted by tweaking the simulation falloff. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7756
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 7887aaaf658..463334720c5 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -230,8 +230,7 @@ static bool paint_tool_require_location(Brush *brush, ePaintMode mode)
SCULPT_TOOL_THUMB)) {
return false;
}
- else if (brush->sculpt_tool == SCULPT_TOOL_CLOTH &&
- brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB) {
+ else if (SCULPT_is_cloth_deform_brush(brush)) {
return false;
}
else {