diff options
author | Pablo Dobarro <pablodp606> | 2020-09-18 00:46:22 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-18 00:46:36 +0300 |
commit | adfbb77b20c2c0f55c8bd99313ae11e546687d83 (patch) | |
tree | e9d381d92adc986019ea360059b397deb289710e | |
parent | 459fd1814c6f946ae4aa5edf867a8b4c2c80c0c5 (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
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 5 |
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; |