[Bf-blender-cvs] [3ed1a99dd26] sculpt-dev: Fix elastic deform surface falloff crashing or breaking geometry
Pablo Dobarro
noreply at git.blender.org
Fri Feb 5 21:59:38 CET 2021
Commit: 3ed1a99dd26f68e493c6a553e1a020b86f1a2adf
Author: Pablo Dobarro
Date: Fri Feb 5 20:44:45 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB3ed1a99dd26f68e493c6a553e1a020b86f1a2adf
Fix elastic deform surface falloff crashing or breaking geometry
===================================================================
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 2d4b53bcabd..8b334dd168a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4505,10 +4505,16 @@ static void do_elastic_deform_brush_task_cb_ex(void *__restrict userdata,
float orig_co[3];
if (brush->flag2 & BRUSH_USE_SURFACE_FALLOFF) {
+ const float geodesic_dist = ss->cache->geodesic_dists[ss->cache->mirror_symmetry_pass][vd.index];
+
+ if (geodesic_dist == FLT_MAX) {
+ continue;
+ }
+
float disp[3];
sub_v3_v3v3(disp, orig_data.co, ss->cache->initial_location);
normalize_v3(disp);
- mul_v3_fl(disp, ss->cache->geodesic_dists[ss->cache->mirror_symmetry_pass][vd.index]);
+ mul_v3_fl(disp, geodesic_dist);
add_v3_v3v3(orig_co, ss->cache->initial_location, disp);
}
else {
More information about the Bf-blender-cvs
mailing list