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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-13 17:59:58 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-12-13 21:25:45 +0300
commit6601a89650f92454aa57bc01bedebd4086f6d98d (patch)
treee25523b1b8598f64947a727266bd13f7223ca299 /source/blender/editors/interface/interface_draw.c
parent33993c056a557d8c51ff9d01ff3666ab81d40c29 (diff)
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.
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index ef9a69cd1dd..f1ada343faa 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1404,15 +1404,12 @@ static void ui_draw_colorband_handle(
void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti *rect)
{
- struct ColorManagedDisplay *display = NULL;
+ struct ColorManagedDisplay *display = ui_block_cm_display_get(but->block);
uint pos_id, col_id;
ColorBand *coba = (ColorBand *)(but->editcoba ? but->editcoba : but->poin);
if (coba == NULL) return;
- if (but->block->color_profile)
- display = ui_block_cm_display_get(but->block);
-
float x1 = rect->xmin;
float sizex = rect->xmax - x1;
float sizey = BLI_rcti_size_y(rect);