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:
authorAntony Riakiotakis <kalast@gmail.com>2014-11-06 22:19:21 +0300
committerAntony Riakiotakis <kalast@gmail.com>2014-11-06 22:19:21 +0300
commit0627bc22f598651cf86ee629d8211ebee7cc85ed (patch)
treeeaf1e71133cec387ab795480a7beebfb644f448e /source/blender/editors/interface/interface_intern.h
parent4542504162a2962188e708e8b7dab609bddc0865 (diff)
Fix T42208 color pickers are coupled.
Decouple color picker hsv data from the whole block. Basically, each color picker now takes care of creating its own color picker role. For this bug report it can be seen that probably HSV is not the best space for gamma/lift/gain workflow because it is bounded at 1.0 but this is a separate issue.
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 47d0e29061c..54e15a2604d 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -36,6 +36,7 @@
#include "BLI_compiler_attrs.h"
#include "UI_resources.h"
#include "RNA_types.h"
+#include "DNA_listBase.h"
struct ARegion;
struct bContext;
@@ -306,6 +307,16 @@ struct uiBut {
uiBlock *block;
};
+typedef struct ColorPicker {
+ struct ColorPicker *next, *prev;
+ float color_data[3]; /* colr data may be HSV or HSL for now */
+ int representation; /* store hsv/hsl value */
+} ColorPicker;
+
+typedef struct ColorPickerData {
+ ListBase list;
+} ColorPickerData;
+
struct PieMenuData {
float pie_dir[2];
float pie_center_init[2];
@@ -392,7 +403,7 @@ struct uiBlock {
void *evil_C; /* XXX hack for dynamic operator enums */
struct UnitSettings *unit; /* unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time. */
- float _hsv[3]; /* XXX, only access via ui_block_hsv_get() */
+ ColorPickerData color_pickers; /* XXX, only accessed by color picker templates */
bool color_profile; /* color profile for correcting linear colors for display */
@@ -540,7 +551,7 @@ void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but);
void ui_popup_translate(struct bContext *C, struct ARegion *ar, const int mdiff[2]);
-float *ui_block_hsv_get(struct uiBlock *block);
+ColorPicker *ui_block_picker_new(struct uiBlock *block);
void ui_popup_block_scrolltest(struct uiBlock *block);
void ui_rgb_to_color_picker_compat_v(const float rgb[3], float r_cp[3]);