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/space_node
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/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c51
1 files changed, 37 insertions, 14 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 3092aaba507..fe5c7bca3a6 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -125,7 +125,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
RNA_property_collection_lookup_int(ptr, prop, 0, &sockptr);
col = uiLayoutColumn(layout, 0);
- uiTemplateColorWheel(col, &sockptr, "default_value", 1);
+ uiTemplateColorWheel(col, &sockptr, "default_value", 1, 0);
uiItemR(col, "", 0, &sockptr, "default_value", 0);
}
@@ -917,21 +917,44 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *C, Point
{
uiLayout *split, *col, *row;
- split = uiLayoutSplit(layout, 0, 0);
- col = uiLayoutColumn(split, 0);
- uiTemplateColorWheel(col, ptr, "lift", 1);
- row = uiLayoutRow(col, 0);
- uiItemR(row, NULL, 0, ptr, "lift", 0);
+ uiItemR(layout, NULL, 0, ptr, "correction_formula", 0);
- col = uiLayoutColumn(split, 0);
- uiTemplateColorWheel(col, ptr, "gamma", 1);
- row = uiLayoutRow(col, 0);
- uiItemR(row, NULL, 0, ptr, "gamma", 0);
+ if (RNA_enum_get(ptr, "correction_formula")== 0) {
- col = uiLayoutColumn(split, 0);
- uiTemplateColorWheel(col, ptr, "gain", 1);
- row = uiLayoutRow(col, 0);
- uiItemR(row, NULL, 0, ptr, "gain", 0);
+ split = uiLayoutSplit(layout, 0, 0);
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "lift", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "lift", 0);
+
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "gamma", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "gamma", 0);
+
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "gain", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "gain", 0);
+
+ } else {
+
+ split = uiLayoutSplit(layout, 0, 0);
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "offset", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "offset", 0);
+
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "power", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "power", 0);
+
+ col = uiLayoutColumn(split, 0);
+ uiTemplateColorWheel(col, ptr, "slope", 1, 1);
+ row = uiLayoutRow(col, 0);
+ uiItemR(row, NULL, 0, ptr, "slope", 0);
+ }
}