Fix T52696: Sculpt - Brush spacing pressure artifacts

Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
This commit is contained in:
Joshua Leung 2017-09-11 18:24:39 +12:00
parent 6d2cd1719b
commit 7e56879772
Notes: blender-bot 2023-07-10 10:12:37 +02:00
Referenced by issue #52696, Sculpt: Brush spacing pressure artifacts
1 changed files with 4 additions and 1 deletions

View File

@ -580,7 +580,10 @@ static float paint_stroke_integrate_overlap(Brush *br, float factor)
max = overlap;
}
return 1.0f / max;
if (max == 0.0f)
return 1.0f;
else
return 1.0f / max;
}
static float paint_space_stroke_spacing_variable(const Scene *scene, PaintStroke *stroke, float pressure, float dpressure, float length)