diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-15 09:29:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-15 09:31:13 +0400 |
commit | 2b796ed03d8d256a1325e62d19c51702937df027 (patch) | |
tree | bfa98000cb87be84784064138abf72485fc68cda /source/blender/editors | |
parent | 36cbdb860a9f620aa8a6c3280c73b0f7059c705d (diff) |
ColorRamp HSV, HSL Blend Modes
D297 by charlie with own edits
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index cb5f5331c2e..7f85a2314ca 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -37,6 +37,7 @@ #include "DNA_object_types.h" #include "DNA_object_force.h" #include "DNA_brush_types.h" +#include "DNA_texture_types.h" #include "BLI_utildefines.h" #include "BLI_string.h" @@ -1529,7 +1530,15 @@ static void colorband_buttons_layout(uiLayout *layout, uiBlock *block, ColorBand row = uiLayoutRow(split, false); - uiItemR(row, &ptr, "interpolation", 0, "", ICON_NONE); + uiBlockBeginAlign(block); + uiItemR(row, &ptr, "color_mode", 0, "", ICON_NONE); + if (ELEM(coba->color_mode, COLBAND_BLEND_HSV, COLBAND_BLEND_HSL)) { + uiItemR(row, &ptr, "hue_interpolation", 0, "", ICON_NONE); + } + else { /* COLBAND_BLEND_RGB */ + uiItemR(row, &ptr, "interpolation", 0, "", ICON_NONE); + } + uiBlockEndAlign(block); row = uiLayoutRow(layout, false); @@ -1567,7 +1576,7 @@ static void colorband_buttons_layout(uiLayout *layout, uiBlock *block, ColorBand uiDefButS(block, NUM, 0, "", 0, 0, 5.0f * UI_UNIT_X, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot - 1)), 0, 0, TIP_("Choose active color stop")); row = uiLayoutRow(subsplit, false); - uiItemR(row, &ptr, "position", 0, IFACE_("Pos"), ICON_NONE); + uiItemR(row, &ptr, "position", UI_ITEM_R_SLIDER, IFACE_("Pos"), ICON_NONE); bt = block->buttons.last; uiButSetFunc(bt, colorband_update_cb, bt, coba); |