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:
authorCampbell Barton <ideasman42@gmail.com>2015-03-19 06:09:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-19 06:12:51 +0300
commit4f602ff943d91d0e6069e231916d2482ee859688 (patch)
tree7efadce9699d7713447b368f9a18fff1b8b14c1c /source/blender/editors/interface/interface_widgets.c
parent255b07681acfe2ce8dd3af7d5b032d3c759cb93e (diff)
Revert part of recent color-management commit
This adds back rgb_to_grayscale, not all color is managed or depends on the current loaded blend file's CM options. Noted in comments that this is only to be used outside the CM pipeline.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 9020522bb59..3d021e7dd10 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -27,7 +27,6 @@
* \ingroup edinterface
*/
-
#include <limits.h>
#include <stdlib.h>
#include <string.h>
@@ -56,8 +55,6 @@
#include "UI_interface.h"
#include "UI_interface_icons.h"
-#include "IMB_colormanagement.h"
-
#include "interface_intern.h"
#ifdef WITH_INPUT_IME
@@ -3028,7 +3025,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 = IMB_colormanagement_get_luminance(col);
+ float bw = rgb_to_grayscale(col);
bw += (bw < 0.5f) ? 0.5f : -0.5f;