Blender Git Loki

Git Commits -> Revision 2b094be

Revision 2b094be by Philipp Oeser (master)
April 30, 2020, 07:54 (GMT)
Fix T75985: Texture paint brush gradients results in wrong color

A Colorband's CBData color **is not** considered `PROP_COLOR_GAMMA`.
A Brushes color **is** considered `PROP_COLOR_GAMMA`.
(PROP_COLOR_GAMMA is used for colors which would be color managed before
display, could be renamed to something better once...)

This leads to different rgb values in ColorBand.CBData of br->gradient
and brush->rgb for seemingly identical colors. (this is because color
pickers do differently in case block->is_color_gamma_picker/
ui_but_is_color_gamma)

Now it looks like `paint_brush_color_get` is expected to return a color
in sRGB (according to @jbakker this is for legacy reasons) so we need to
run the colorband colors through linear -> sRGB.

It might very well be the case that a much deeper cleanup in this area
is needed, this is just a fix to get gradient brush colors
consistent again...

Maniphest Tasks: T75985

Differential Revision: https://developer.blender.org/D7501

Commit Details:

Full Hash: 2b094be9493dd1022a5f07ed1a1cde69670474d8
Parent Commit: cd833d8
Lines Changed: +4, -0

1 Modified Path:

/source/blender/editors/sculpt_paint/paint_image.c (+4, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021