Page MenuHome

Fix T75985: Texture paint brush gradients results in wrong color
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Apr 23 2020, 11:13 AM.

Details

Summary

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)

This leads to different values in ColorBand.CBData.rgba of br->gradient
and brush->rgb for seemingly identical colors.(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? If this is the case, 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 bandaid to get gradient brush colors
consistent again...

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Apr 23 2020, 11:13 AM

Yes, the point is that everything should be done in scene linear space. Brushes due to legacy are in sRGB. IMO PROP_COLOR_GAMMA should be renamed to something that makes more sense.

This revision is now accepted and ready to land.Apr 30 2020, 8:58 AM