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-21 03:00:45 +0300
committerMatt Ebb <matt@mke3.net>2010-01-21 03:00:45 +0300
commit3e1783c715201320caf87b3660bd590892277ae2 (patch)
treee596e14a74f2fa86176c4bfd77b7b13326725c4e /source/blender/editors/interface/interface_draw.c
parent946cdd8ff6ad6e799c1aeaea9540b599e9648476 (diff)
New Compositor node: Hue Control
Was very quick to do, now re-aquainted with node editor. http://mke3.net/blender/devel/2.5/hue_correct_node.jpg Todo: modes for affecting hue and value on the vertical axis as well as just saturation - or if an enterprising coder wants to give it a go, let me know and I can help :)
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 5946005dc6a..090f5d38279 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1061,7 +1061,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glColor3ubv((unsigned char*)wcol->inner);
glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
}
-
+
/* grid, every .25 step */
glColor3ubvShade(wcol->inner, -16);
ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 0.25f);
@@ -1077,6 +1077,24 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glVertex2f(rect->xmin + zoomx*(-offsx), rect->ymax);
glEnd();
+ /* magic trigger for curve backgrounds */
+ if (but->a1 != -1) {
+ if (but->a1 == UI_GRAD_H) {
+ rcti grid;
+ float col[3];
+
+ grid.xmin = rect->xmin + zoomx*(-offsx);
+ grid.xmax = rect->xmax + zoomx*(-offsx);
+ grid.ymin = rect->ymin + zoomy*(-offsy);
+ grid.ymax = rect->ymax + zoomy*(-offsy);
+
+ glEnable(GL_BLEND);
+ ui_draw_gradient(&grid, col, UI_GRAD_H, 0.5f);
+ glDisable(GL_BLEND);
+ }
+ }
+
+
/* cfra option */
/* XXX 2.48
if(cumap->flag & CUMA_DRAW_CFRA) {