[#31410] Code review testing: The color correction node in particular is
authorJeroen Bakker <j.bakker@atmind.nl>
Mon, 21 May 2012 18:47:55 +0000 (18:47 +0000)
committerJeroen Bakker <j.bakker@atmind.nl>
Mon, 21 May 2012 18:47:55 +0000 (18:47 +0000)
quite problematic in button layout
 * Added first column with labels
 * increased max size of node
 * moved the start/end midtones to the bottom of the node

source/blender/editors/space_node/drawnode.c
source/blender/nodes/composite/nodes/node_composite_colorcorrection.c

index ecdd30ce966ea026aabfa0c006db315cdd6ce46b..be1918634af984e98b4566d95d36317e8a48b0d2 100644 (file)
@@ -1984,10 +1984,15 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
        uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE);
 
        row = uiLayoutRow(layout, 0);
-       uiItemR(row, ptr, "midtones_start", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-       uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+       uiItemL(row, "", 0);
+       uiItemL(row, "Saturation", 0);
+       uiItemL(row, "Contrast", 0);
+       uiItemL(row, "Gamma", 0);
+       uiItemL(row, "Gain", 0);
+       uiItemL(row, "Lift", 0);
 
        row = uiLayoutRow(layout, 0);
+       uiItemL(row, "Master", 0);
        uiItemR(row, ptr, "master_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "master_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "master_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1995,13 +2000,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
        uiItemR(row, ptr, "master_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
        row = uiLayoutRow(layout, 0);
-       uiItemL(row, "Saturation", 0);
-       uiItemL(row, "Contrast", 0);
-       uiItemL(row, "Gamma", 0);
-       uiItemL(row, "Gain", 0);
-       uiItemL(row, "Lift", 0);
-
-       row = uiLayoutRow(layout, 0);
+       uiItemL(row, "Highlights", 0);
        uiItemR(row, ptr, "highlights_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "highlights_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "highlights_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2009,6 +2008,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
        uiItemR(row, ptr, "highlights_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
        row = uiLayoutRow(layout, 0);
+       uiItemL(row, "Midtones", 0);
        uiItemR(row, ptr, "midtones_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "midtones_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "midtones_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2016,11 +2016,16 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE
        uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
        row = uiLayoutRow(layout, 0);
+       uiItemL(row, "Shadows", 0);
        uiItemR(row, ptr, "shadows_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "shadows_contrast", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "shadows_gamma", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "shadows_gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "shadows_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+
+       row = uiLayoutRow(layout, 0);
+       uiItemR(row, ptr, "midtones_start", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+       uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 }
 static void node_composit_buts_colorcorrection_but(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) {
        uiLayout *row;
index af085418c0e3f3a1abb1588448db7e3289053661..929efaef2c8396a9b4986867c041017e0ddd0585 100644 (file)
@@ -81,7 +81,7 @@ void register_node_type_cmp_colorcorrection(bNodeTreeType *ttype)
 
        node_type_base(ttype, &ntype, CMP_NODE_COLORCORRECTION, "Color Correction", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
        node_type_socket_templates(&ntype, cmp_node_colorcorrection_in, cmp_node_colorcorrection_out);
-       node_type_size(&ntype, 400, 200, 400);
+       node_type_size(&ntype, 400, 200, 500);
        node_type_init(&ntype, node_composit_init_colorcorrection);
        node_type_storage(&ntype, "NodeColorCorrection", node_free_standard_storage, node_copy_standard_storage);