[Bf-blender-cvs] [9a9e9b1c4da] blender-v2.79-release: Fix T52696: Sculpt - Brush spacing pressure artifacts
Joshua Leung
noreply at git.blender.org
Mon Sep 11 09:37:20 CEST 2017
Commit: 9a9e9b1c4dace4f9beab0caae128588a1682049e
Author: Joshua Leung
Date: Mon Sep 11 18:24:39 2017 +1200
Branches: blender-v2.79-release
https://developer.blender.org/rB9a9e9b1c4dace4f9beab0caae128588a1682049e
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!
===================================================================
M source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 05270dbfa09..bb2cd52a41e 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -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)
More information about the Bf-blender-cvs
mailing list