From 6991b13e41f39e07e1d6bf4a3ae95249e610afb8 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 12 Oct 2020 19:31:38 +0200 Subject: 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 --- source/blender/editors/sculpt_paint/sculpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index f512da504eb..078baf0dfc6 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -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, -- cgit v1.2.3