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:
authorCampbell Barton <ideasman42@gmail.com>2009-08-21 11:19:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-21 11:19:06 +0400
commit46fb2d37e347b6ecbd0097aa662cd2fdc4b65f33 (patch)
tree5f29751ed04152753802f894cf65e7fd96fd593f /source/blender/editors/sculpt_paint/paint_image.c
parent589ea76833778a37fe0ec93cc28de1102d9793b5 (diff)
have texture paint use the curve rather then the falloff setting (falloff gave ugly center area of 100% opacity)
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index afd8336c2a9..d082e17cda3 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -3707,7 +3707,7 @@ static void *do_projectpaint_thread(void *ph_v)
ProjPaintImage *last_projIma= NULL;
ImagePaintPartialRedraw *last_partial_redraw_cell;
- float rgba[4], alpha, dist_nosqrt;
+ float rgba[4], alpha, dist_nosqrt, dist;
float brush_size_sqared;
float falloff;
@@ -3721,6 +3721,7 @@ static void *do_projectpaint_thread(void *ph_v)
float co[2];
float mask = 1.0f; /* airbrush wont use mask */
unsigned short mask_short;
+ float size_half = ((float)ps->brush->size) * 0.5f;
LinkNode *smearPixels = NULL;
LinkNode *smearPixels_f = NULL;
@@ -3755,8 +3756,8 @@ static void *do_projectpaint_thread(void *ph_v)
dist_nosqrt = Vec2Lenf_nosqrt(projPixel->projCoSS, pos);
/*if (dist < s->brush->size) {*/ /* correct but uses a sqrtf */
- if (dist_nosqrt < brush_size_sqared) {
- falloff = brush_sample_falloff_noalpha(ps->brush, sqrtf(dist_nosqrt));
+ if (dist_nosqrt < brush_size_sqared && (dist=sqrtf(dist_nosqrt)) < size_half) {
+ falloff = brush_curve_strength(ps->brush, dist, size_half);
if (falloff > 0.0f) {
if (ps->is_texbrush) {
brush_sample_tex(ps->brush, projPixel->projCoSS, rgba);