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:
authorMatt Ebb <matt@mke3.net>2010-01-27 03:22:29 +0300
committerMatt Ebb <matt@mke3.net>2010-01-27 03:22:29 +0300
commit0bb36e9ced06b04b961300b21211f456c7035bcf (patch)
tree9e38b0b5e9b84a22a7a03c5cad4139106168685c /source/blender/editors/interface/interface_handlers.c
parentebafb7e484fa45aed0f4be75cfb5d570d7d43f81 (diff)
Fixes to Color Balance node:
* The Lift/Gamma/Gain formula previously was incorrect, fixed this and removed conversions - now the RNA values are the same as what goes into the formula. * Because of this, added the ability for the Value slider to map to a wider range than 0.0-1.0. The black/white gradient remains the same, in this case just indicating darker/brighter rather than absolute colour values. Also added ability for color wheels to be locked at full brightness (useful for this case, where the color value itself is dark). * Added an alternate formula - offset/power/slope (asc-cdl). This fits the standard Color Decision List formula, here for compatibility with other systems, though default Lift/Gamma/Gain is easier to use and gives nicer results.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index b84bdcd958e..bb3709295f8 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2872,10 +2872,18 @@ static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
hsv[2]= x;
}
else if (but->a1==9){
+ float range;
+
/* vertical 'value' strip */
hsv[2]= y;
+
+ /* exception only for value strip - use the range set in but->min/max */
+ range = but->softmax - but->softmin;
+ hsv[2] = y*range + but->softmin;
+
if (color_profile)
hsv[2] = srgb_to_linearrgb(hsv[2]);
+
}
hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2);