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:39:39 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-12-17 22:08:58 +0300
commitb10d8e330e529abb1cb017312b46a33ede24a8d0 (patch)
tree49ece9cc39a6387f83a31a309935dbb6c92dfd40 /source/blender/editors/interface/interface_intern.h
parentf193b1afb313bcb937a396f09da2b9903a0d2fc3 (diff)
Cleanup: renaming and code deduplication for color space clarity in picker
Ref T68926
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 8f894d0c4bb..a35d9d5d336 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -382,15 +382,15 @@ typedef struct ColorPicker {
/** 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];
+ float hsv_perceptual[3];
/** Initial color data (to detect changes). */
- float color_data_init[3];
+ float hsv_perceptual_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];
+ float hsv_scene_linear[3];
/** Cubic saturation for the color wheel. */
bool use_color_cubic;
@@ -743,15 +743,14 @@ struct uiPopupBlockHandle {
/* exposed as public API in UI_interface.h */
/* interface_region_color_picker.c */
-void ui_rgb_to_color_picker_compat_v(const float rgb[3], float r_cp[3]);
-void ui_rgb_to_color_picker_v(const float rgb[3], float r_cp[3]);
-void ui_color_picker_to_rgb_v(const float r_cp[3], float rgb[3]);
-void ui_color_picker_to_rgb(float r_cp0, float r_cp1, float r_cp2, float *r, float *g, float *b);
+void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3]);
+void ui_color_picker_rgb_to_hsv(const float rgb[3], float r_cp[3]);
+void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3]);
bool ui_but_is_color_gamma(uiBut *but);
-void ui_scene_linear_to_color_picker_space(uiBut *but, float rgb[3]);
-void ui_color_picker_to_scene_linear_space(uiBut *but, float rgb[3]);
+void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3]);
+void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3]);
uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
ColorPicker *ui_block_colorpicker_create(struct uiBlock *block);