diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-25 14:14:07 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-25 14:14:07 +0400 |
commit | d63f1cb5e4aa400be86f81d4ae294576a796c562 (patch) | |
tree | fc96860feb1f4def4f20eb6ff4608bd6e89c43f0 /source/blender/editors/space_node/drawnode.c | |
parent | 5f0ee9e9edda3d6d87be67b415e6d0826a87fca6 (diff) |
Expose image's and clip's input color space settings to properties panel in compositor,
so now input color space could be changed directly from the compositor.
The only unfinished thing is missed compositor update when color space is
changing. Not sure about correct fix for this yet.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 458b87106d9..8ad02ad7d8b 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1494,6 +1494,21 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA * node_buts_image_user(layout, C, ptr, &imaptr, &iuserptr); } +static void node_composit_buts_image_details(uiLayout *layout, bContext *C, PointerRNA *ptr) +{ + bNode *node = ptr->data; + PointerRNA imaptr; + + node_composit_buts_image(layout, C, ptr); + + if (!node->id) + return; + + imaptr = RNA_pointer_get(ptr, "image"); + + uiTemplateColorspaceSettings(layout, &imaptr, "colorspace_settings"); +} + static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr) { bNode *node = ptr->data; @@ -2221,6 +2236,21 @@ static void node_composit_buts_movieclip(uiLayout *layout, bContext *C, PointerR uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL); } +static void node_composit_buts_movieclip_details(uiLayout *layout, bContext *C, PointerRNA *ptr) +{ + bNode *node = ptr->data; + PointerRNA clipptr; + + uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL); + + if (!node->id) + return; + + clipptr = RNA_pointer_get(ptr, "clip"); + + uiTemplateColorspaceSettings(layout, &clipptr, "colorspace_settings"); +} + static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, PointerRNA *ptr) { bNode *node = ptr->data; @@ -2619,6 +2649,7 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_IMAGE: ntype->uifunc = node_composit_buts_image; + ntype->uifuncbut = node_composit_buts_image_details; break; case CMP_NODE_R_LAYERS: ntype->uifunc = node_composit_buts_renderlayers; @@ -2773,6 +2804,7 @@ static void node_composit_set_butfunc(bNodeType *ntype) break; case CMP_NODE_MOVIECLIP: ntype->uifunc = node_composit_buts_movieclip; + ntype->uifuncbut = node_composit_buts_movieclip_details; break; case CMP_NODE_STABILIZE2D: ntype->uifunc = node_composit_buts_stabilize2d; |