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 <brecht@blender.org>2020-12-17 21:29:39 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-12-17 22:08:58 +0300
commitf193b1afb313bcb937a396f09da2b9903a0d2fc3 (patch)
tree650ede7c68b6cdf7520e98d2a28600b7ea141c34 /source/blender/editors/interface/interface_intern.h
parent48ddb94a26611a27d24ec02c2275b4f1fe27f87f (diff)
Color Management: use scene linear HSV for number buttons in color pickers
Previously these HSV values were in the color picking space, which meant the relation to the scene linear RGB values was confusing. The new situation: * RGB number buttons: scene linear color space * HSV number buttons: scene linear color space * Picker widgets: color picking color space * Hex: sRGB color space Fixes T69562, T83853, Ref T68926
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 5c7cad4c8d5..8f894d0c4bb 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -378,11 +378,20 @@ typedef struct uiButExtraOpIcon {
typedef struct ColorPicker {
struct ColorPicker *next, *prev;
- /** Color data, may be HSV or HSL. */
+
+ /** Color in HSV or HSL, in color picking color space. Used for HSV cube,
+ * circle and slider widgets. The color picking space is perceptually
+ * linear for intuitive editing. */
float color_data[3];
- /** Initial color data (detect changes). */
+ /** Initial color data (to detect changes). */
float color_data_init[3];
bool is_init;
+
+ /** HSV or HSL color in scene linear color space value used for number
+ * buttons. This is scene linear so that there is a clear correspondence
+ * to the scene linear RGB values. */
+ float hsv[3];
+
/** Cubic saturation for the color wheel. */
bool use_color_cubic;
bool use_color_lock;