Fix T81649: Cloth simulation dynamic area mode tearing the mesh

Dynamic area should use the radius instead of the initial radius to get
the nodes as the radius can now change during the stroke. In case of
anchored strokes, the current radius can be bigger than the initial
radius, simulating vertices outside the falloff area and breaking the
mesh.

Reviewed By: sergey

Maniphest Tasks: T81649

Differential Revision: https://developer.blender.org/D9181
This commit is contained in:
Pablo Dobarro 2020-10-12 19:31:38 +02:00
parent ef5f307031
commit 6991b13e41
Notes: blender-bot 2023-02-14 05:53:42 +01:00
Referenced by issue #81649, Dynamic Simulation Area for Anchored Stroke method for Cloth brushes tears apart geometry
1 changed files with 1 additions and 1 deletions

View File

@ -5684,7 +5684,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
SculptSearchSphereData data = {
.ss = ss,
.sd = sd,
.radius_squared = square_f(ss->cache->initial_radius * (1.0 + brush->cloth_sim_limit)),
.radius_squared = square_f(ss->cache->radius * (1.0 + brush->cloth_sim_limit)),
.original = false,
.ignore_fully_ineffective = false,
.center = ss->cache->location,