[Bf-blender-cvs] [6e4b9f5836c] master: Fix T89221: Sculpt tools symmetry failing with non symmetrical meshes

Pablo Dobarro noreply at git.blender.org
Wed Jun 23 18:24:49 CEST 2021


Commit: 6e4b9f5836cd9954c00b52e043e6a9af9fb4c112
Author: Pablo Dobarro
Date:   Fri Jun 18 01:28:10 2021 +0200
Branches: master
https://developer.blender.org/rB6e4b9f5836cd9954c00b52e043e6a9af9fb4c112

Fix T89221: Sculpt tools symmetry failing with non symmetrical meshes

SCULPT_nearest_vertex_get expects a distance, not a distance squared.
This should make symmetry work as expected, but it still can fail if the
mesh topology is not completely symmetrical.

Reviewed By: JacquesLucke

Maniphest Tasks: T89221

Differential Revision: https://developer.blender.org/D11642

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index d6d54a1985d..ab5c46f4bc5 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1146,10 +1146,9 @@ void SCULPT_floodfill_add_active(
       v = SCULPT_active_vertex_get(ss);
     }
     else if (radius > 0.0f) {
-      float radius_squared = (radius == FLT_MAX) ? FLT_MAX : radius * radius;
       float location[3];
       flip_v3_v3(location, SCULPT_active_vertex_co_get(ss), i);
-      v = SCULPT_nearest_vertex_get(sd, ob, location, radius_squared, false);
+      v = SCULPT_nearest_vertex_get(sd, ob, location, radius, false);
     }
 
     if (v != -1) {



More information about the Bf-blender-cvs mailing list