Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2021-06-18 02:28:10 +0300
committerPablo Dobarro <pablodp606@gmail.com>2021-06-23 19:17:46 +0300
commit6e4b9f5836cd9954c00b52e043e6a9af9fb4c112 (patch)
treeb63cd052ae428d424eae3cfc036138ddb9fdc4de
parentc9f12b21e252fee3f102b9e04dfde000016dc099 (diff)
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
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
1 files changed, 1 insertions, 2 deletions
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) {