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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-08-23 11:25:54 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-08-23 12:39:11 +0300
commit4de7c0c3105a80d244dd9f2078c310331873a16b (patch)
tree35c091edbd67d2d3fbbbfb078f0085df52999458 /source/blender/editors/interface
parent01973290a9fd6c7e48ab4d19043eb3a26939cb4e (diff)
Compositor: Film-like curve
Film-like curves for the RGB Curve node (Compositor) and Curve Modifier (Sequencer) Film-like curves originated from Adobe. "It’s an RGB curve where the tone curve is applied on the largest and smallest value, and then the middle value is adapted to keep a constant hue as defined by RGB-HSL/HSV. In terms of look and saturation increase it’s very similar to a pure RGB curve, more so than a HSL-L curve or HSV-V curve, but some color shift problems are avoided." Other tools like Natron, Krita and RawTherapee have implemented this curve tone. Reviewers: brecht, campbellbarton Reviewed By: brecht Tags: #compositing, #video_sequencer Differential Revision: https://developer.blender.org/D3638
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_templates.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index e81ad1428d1..820b34c1ac4 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2942,7 +2942,7 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
/* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */
static void curvemap_buttons_layout(
uiLayout *layout, PointerRNA *ptr, char labeltype, bool levels,
- bool brush, bool neg_slope, RNAUpdateCb *cb)
+ bool brush, bool neg_slope, bool tone, RNAUpdateCb *cb)
{
CurveMapping *cumap = ptr->data;
CurveMap *cm = &cumap->cm[cumap->cur];
@@ -2956,6 +2956,11 @@ static void curvemap_buttons_layout(
block = uiLayoutGetBlock(layout);
+ if (tone) {
+ split = uiLayoutSplit(layout, 0.0f, false);
+ uiItemR(uiLayoutRow(split, false), ptr, "tone", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ }
+
/* curve chooser */
row = uiLayoutRow(layout, false);
@@ -3107,7 +3112,7 @@ static void curvemap_buttons_layout(
void uiTemplateCurveMapping(
uiLayout *layout, PointerRNA *ptr, const char *propname, int type,
- bool levels, bool brush, bool neg_slope)
+ bool levels, bool brush, bool neg_slope, bool tone)
{
RNAUpdateCb *cb;
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
@@ -3138,7 +3143,7 @@ void uiTemplateCurveMapping(
id = cptr.id.data;
UI_block_lock_set(block, (id && ID_IS_LINKED(id)), ERROR_LIBDATA_MESSAGE);
- curvemap_buttons_layout(layout, &cptr, type, levels, brush, neg_slope, cb);
+ curvemap_buttons_layout(layout, &cptr, type, levels, brush, neg_slope, tone, cb);
UI_block_lock_clear(block);
@@ -4797,7 +4802,7 @@ void uiTemplateColormanagedViewSettings(uiLayout *layout, bContext *UNUSED(C), P
col = uiLayoutColumn(layout, false);
uiItemR(col, &view_transform_ptr, "use_curve_mapping", 0, NULL, ICON_NONE);
if (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES)
- uiTemplateCurveMapping(col, &view_transform_ptr, "curve_mapping", 'c', true, false, false);
+ uiTemplateCurveMapping(col, &view_transform_ptr, "curve_mapping", 'c', true, false, false, false);
}
/********************************* Component Menu *************************************/