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:
authorPablo Dobarro <pablodp606@gmail.com>2020-02-11 19:28:46 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-02-11 19:52:17 +0300
commit35490c3ead03d472dbcba36c85d428e81b442520 (patch)
tree59a687334ffc1eb62b39f823a5c1e19077e2c78e /source/blender/editors/sculpt_paint/paint_image_proj.c
parent2fb928537104ec5a5060c29a6bc253906ff8a3dc (diff)
Fix T73656: Use BKE_brush_alpha_get in texture paint
The code was using brush->alpha directly, so the alpha value from UnifiedPaintSettings was not used when eneabled. Reviewed By: brecht Maniphest Tasks: T73656 Differential Revision: https://developer.blender.org/D6804
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index bb7340b95b0..55779ad61b0 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5293,7 +5293,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool),
}
}
BKE_colorband_evaluate(brush->gradient, f, color_f);
- color_f[3] *= ((float)projPixel->mask) * (1.0f / 65535.0f) * brush->alpha;
+ color_f[3] *= ((float)projPixel->mask) * (1.0f / 65535.0f) * brush_alpha;
if (is_floatbuf) {
/* convert to premultipied */
@@ -5321,7 +5321,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool),
else {
if (is_floatbuf) {
float newColor_f[4];
- newColor_f[3] = ((float)projPixel->mask) * (1.0f / 65535.0f) * brush->alpha;
+ newColor_f[3] = ((float)projPixel->mask) * (1.0f / 65535.0f) * brush_alpha;
copy_v3_v3(newColor_f, ps->paint_color_linear);
IMB_blend_color_float(
@@ -5329,7 +5329,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool),
}
else {
float mask = ((float)projPixel->mask) * (1.0f / 65535.0f);
- projPixel->newColor.ch[3] = mask * 255 * brush->alpha;
+ projPixel->newColor.ch[3] = mask * 255 * brush_alpha;
rgb_float_to_uchar(projPixel->newColor.ch, ps->paint_color);
IMB_blend_color_byte(projPixel->pixel.ch_pt,