Fix T58549, T56741: HSV color picker issues with Filmic view transform.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 13 Dec 2018 14:59:58 +0000 (15:59 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 13 Dec 2018 18:25:45 +0000 (19:25 +0100)
commit6601a89650f92454aa57bc01bedebd4086f6d98d
treee25523b1b8598f64947a727266bd13f7223ca299
parent33993c056a557d8c51ff9d01ff3666ab81d40c29
Fix T58549, T56741: HSV color picker issues with Filmic view transform.

In 2d655d3 the color picker was changed to use display space HSV values.
This works ok for a simple sRGB EOTF, but fails with view transforms like
Filmic where display space V 1.0 maps to RGB 16.292.

Instead we now use the color_picking role from the OCIO config when
converting from RGB to HSV in the color picker. This role is set to sRGB
in the default OCIO config.

This color space fits the following requirements:

* It is approximately perceptually linear, so that the HSV numbers and
  the HSV cube/circle have an intuitive distribution.
* It has the same gamut as the scene linear color space.
* Color picking values 0..1 map to scene linear values in the 0..1 range,
  so that picked albedo values are energy conserving.
release/datafiles/colormanagement/config.ocio
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_region_color_picker.c
source/blender/editors/interface/interface_widgets.c
source/blender/imbuf/IMB_colormanagement.h
source/blender/imbuf/intern/colormanagement.c