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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-01 23:50:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-01 23:50:37 +0400
commitd7e835684687770bafe3584b6a2485d692deeb15 (patch)
treeb6e899a3e2de055d6087759a4794aaaf6135d845 /source/blender/editors/sculpt_paint/paint_cursor.c
parent9fe63e82c38b9f4ea28929ab7bc144f6d4089d31 (diff)
Fix 2D painting gave squares rather than a disk for the "Max" curve falloff shape.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index b72a284864c..8574d6b8a8f 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -377,10 +377,8 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
len = sqrtf(x * x + y * y);
if (len <= 1) {
- float avg = BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */
+ float avg = BKE_brush_curve_strength_clamp(br, len, 1.0f); /* Falloff curve */
- /* clamp to avoid precision overflow */
- CLAMP(avg, 0.0f, 1.0f);
buffer[index] = 255 - (GLubyte)(255 * avg);
}