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>2022-05-20 18:54:43 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-23 16:34:50 +0300
commiteb5e7d0a31eed698909c23ab0ca89c8fd4929365 (patch)
tree6332d3f66107492795254d4fbc0f8f3beccfb156 /source/blender/editors/interface/interface_region_color_picker.cc
parent469ee7ff1529a1b28ce0b300835ebc42d5c5362f (diff)
Cleanup: clarify what is scene linear color space in conversion conversion
* Rename ambiguous rgb to scene_linear in some places * Precompute matrices to directly go to scene instead of through XYZ * Make function signatures more consistent
Diffstat (limited to 'source/blender/editors/interface/interface_region_color_picker.cc')
-rw-r--r--source/blender/editors/interface/interface_region_color_picker.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_region_color_picker.cc b/source/blender/editors/interface/interface_region_color_picker.cc
index ab0a6039cdc..db1e5e653de 100644
--- a/source/blender/editors/interface/interface_region_color_picker.cc
+++ b/source/blender/editors/interface/interface_region_color_picker.cc
@@ -116,7 +116,7 @@ void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3])
* assuming it is more perceptually linear than the scene linear
* space for intuitive color picking. */
if (!ui_but_is_color_gamma(but)) {
- IMB_colormanagement_scene_linear_to_color_picking_v3(rgb);
+ IMB_colormanagement_scene_linear_to_color_picking_v3(rgb, rgb);
ui_color_picker_rgb_round(rgb);
}
}
@@ -124,7 +124,7 @@ void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3])
void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3])
{
if (!ui_but_is_color_gamma(but)) {
- IMB_colormanagement_color_picking_to_scene_linear_v3(rgb);
+ IMB_colormanagement_color_picking_to_scene_linear_v3(rgb, rgb);
ui_color_picker_rgb_round(rgb);
}
}
@@ -208,7 +208,7 @@ static void ui_update_color_picker_buts_rgb(uiBut *from_but,
* (coming from other applications, web, etc) */
copy_v3_v3(rgb_hex, rgb_scene_linear);
if (from_but && !ui_but_is_color_gamma(from_but)) {
- IMB_colormanagement_scene_linear_to_srgb_v3(rgb_hex);
+ IMB_colormanagement_scene_linear_to_srgb_v3(rgb_hex, rgb_hex);
ui_color_picker_rgb_round(rgb_hex);
}
@@ -291,7 +291,7 @@ static void ui_colorpicker_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexc
/* Hex code is assumed to be in sRGB space (coming from other applications, web, etc) */
if (!ui_but_is_color_gamma(but)) {
- IMB_colormanagement_srgb_to_scene_linear_v3(rgb);
+ IMB_colormanagement_srgb_to_scene_linear_v3(rgb, rgb);
ui_color_picker_rgb_round(rgb);
}
@@ -777,7 +777,7 @@ static void ui_block_colorpicker(uiBlock *block,
copy_v3_v3(rgb_hex, rgba_scene_linear);
if (!ui_but_is_color_gamma(from_but)) {
- IMB_colormanagement_scene_linear_to_srgb_v3(rgb_hex);
+ IMB_colormanagement_scene_linear_to_srgb_v3(rgb_hex, rgb_hex);
ui_color_picker_rgb_round(rgb_hex);
}