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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-17 16:25:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-10-21 14:14:26 +0400
commit2be96c0110b0966c53c597b38398068823db8728 (patch)
tree38621c16f33e5788088e4effbe41711282339027 /source
parent10b16ae2bc4f24c8f44334ede387fe7ec017b515 (diff)
More fixes:
* Fill brush did not do proper srgb conversion for byte images (reported by Sebastian Koenig, thanks!) * Color sampling for palettes did not refresh the toolbar.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f4189b512e5..021822793ff 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1309,6 +1309,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
data->sample_palette = true;
sample_color_update_header(data, C);
}
+ WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
}
break;
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 165888b3c09..b092f95f2fb 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -1619,6 +1619,7 @@ void paint_2d_gradient_fill(
}
do_colorband(br->gradient, f, color_f);
+ linearrgb_to_srgb_v3_v3(color_f, color_f);
rgba_float_to_uchar((unsigned char *)&color_b, color_f);
((unsigned char *)&color_b)[3] *= br->alpha;
IMB_blend_color_byte((unsigned char *)(ibuf->rect + y_px * ibuf->x + x_px),
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 2a6f94a5d90..7fe13070b45 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4104,6 +4104,7 @@ static void *do_projectpaint_thread(void *ph_v)
color_f, ps->blend);
}
else {
+ linearrgb_to_srgb_v3_v3(color_f, color_f);
rgba_float_to_uchar(projPixel->newColor.ch, color_f);
IMB_blend_color_byte(projPixel->pixel.ch_pt, projPixel->origColor.ch_pt,
projPixel->newColor.ch, ps->blend);