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>2020-09-18 00:46:22 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-09-18 00:46:36 +0300
commitadfbb77b20c2c0f55c8bd99313ae11e546687d83 (patch)
treee9d381d92adc986019ea360059b397deb289710e /source/blender/editors
parent459fd1814c6f946ae4aa5edf867a8b4c2c80c0c5 (diff)
Fix Brushes with deformation target being affected by sim areas
Brushes that target the cloth simulation but are not the cloth brush affect the entire mesh, so they don't have simulation areas and falloff. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8885
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_cloth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c
index a95e4f7008c..2207ceda11a 100644
--- a/source/blender/editors/sculpt_paint/sculpt_cloth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c
@@ -108,6 +108,11 @@ static float cloth_brush_simulation_falloff_get(const Brush *brush,
const float location[3],
const float co[3])
{
+ if (brush->sculpt_tool != SCULPT_TOOL_CLOTH) {
+ /* All brushes that are not the cloth brush do not use simulation areas. */
+ return 1.0f;
+ }
+
/* Global simulation does not have any falloff as the entire mesh is being simulated. */
if (brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_GLOBAL) {
return 1.0f;