display a sample line in the hue correct, handy to sample the image to know what...
[blender.git] / source / blender / editors / space_node / drawnode.c
index 78de45dd219ab16be3e82c7776c4b4fdcfe9a4dd..22017a2d8b921241469c2e098b9b65da63ebaf63 100644 (file)
@@ -2134,6 +2134,17 @@ static void node_composit_buts_colorbalance_but(uiLayout *layout, bContext *UNUS
 
 static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 {
+       bNode *node = ptr->data;
+       CurveMapping *cumap = node->storage;
+
+       if (_sample_col[0] != SAMPLE_FLT_ISNONE) {
+               cumap->flag |= CUMA_DRAW_SAMPLE;
+               copy_v3_v3(cumap->sample, _sample_col);
+       }
+       else {
+               cumap->flag &= ~CUMA_DRAW_SAMPLE;
+       }
+
        uiTemplateCurveMapping(layout, ptr, "mapping", 'h', 0, 0);
 }