From a3e832e68b88ff9bea5aa14fdda867a1aaf6919e Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 31 Dec 2014 13:11:42 +0100 Subject: Fix T42984 detail flood fill not respecting mask values for smooth/sharp curves. Issue here is that brush curve could return negative values. This would result in overflow of mask values. Those were not visible during real time preview because result would be clamped. We had two functions in the code, one of which allowed negatives but I don't think that we really want that, users have no control over the negative values at all anyway. Thanks to the reporter, Leon Cheung for figuring out the issue :) --- source/blender/editors/sculpt_paint/paint_image_2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c') diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 2298164822f..95940d89694 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -359,7 +359,7 @@ static unsigned short *brush_painter_curve_mask_new(BrushPainter *painter, int d float xy[2] = {x + xoff, y + yoff}; float len = len_v2(xy); - *m = (unsigned short)(65535.0f * BKE_brush_curve_strength_clamp(brush, len, radius)); + *m = (unsigned short)(65535.0f * BKE_brush_curve_strength(brush, len, radius)); } } -- cgit v1.2.3