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>2015-03-17 17:20:33 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-03-17 17:20:33 +0300
commitdd38dce7f0ae604396d1e96bc49500369fdedf29 (patch)
tree2b32e776f0bb972705d2c884cb6d5ec77deaf714 /source/blender/editors/interface/interface_widgets.c
parent42aac45d7f0e0f43725093e97ebb8175a95aa247 (diff)
Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 91186a14b49..9020522bb59 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -56,6 +56,7 @@
#include "UI_interface.h"
#include "UI_interface_icons.h"
+#include "IMB_colormanagement.h"
#include "interface_intern.h"
@@ -3027,7 +3028,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
float width = rect->xmax - rect->xmin;
float height = rect->ymax - rect->ymin;
/* find color luminance and change it slightly */
- float bw = rgb_to_bw(col);
+ float bw = IMB_colormanagement_get_luminance(col);
bw += (bw < 0.5f) ? 0.5f : -0.5f;