[Bf-blender-cvs] [adfbb77b20c] master: Fix Brushes with deformation target being affected by sim areas

Pablo Dobarro noreply at git.blender.org
Thu Sep 17 23:46:57 CEST 2020


Commit: adfbb77b20c2c0f55c8bd99313ae11e546687d83
Author: Pablo Dobarro
Date:   Thu Sep 17 23:46:22 2020 +0200
Branches: master
https://developer.blender.org/rBadfbb77b20c2c0f55c8bd99313ae11e546687d83

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

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_cloth.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list