diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
commit | 0e2c8cdcdd13a49560e6f105de530c2ef94ed4e4 (patch) | |
tree | 0f53d799ec422ddc96dd948136061e08233abdf4 /source/blender/editors/space_node | |
parent | e0482b2def521df87f09c7aa23e58909f5e19b90 (diff) |
move image settings into their own structure so the interface can be shared where image saving settings are needed.
currently file out node and render output share this struct & UI.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 92592a7c071..47cfa5c763d 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1633,24 +1633,18 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), Po static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { + bNode *node= ptr->data; + NodeImageFile *nif= node->storage; + PointerRNA imfptr; + uiLayout *col, *row; col= uiLayoutColumn(layout, 0); uiItemR(col, ptr, "filepath", 0, "", ICON_NONE); - uiItemR(col, ptr, "image_type", 0, "", ICON_NONE); - - row= uiLayoutRow(layout, 0); - if (RNA_enum_get(ptr, "image_type")== R_OPENEXR) { - uiItemR(row, ptr, "use_exr_half", 0, NULL, ICON_NONE); - uiItemR(row, ptr, "exr_codec", 0, "", ICON_NONE); - } - else if (RNA_enum_get(ptr, "image_type")== R_JPEG90) { - uiItemR(row, ptr, "quality", UI_ITEM_R_SLIDER, "Quality", ICON_NONE); - } - else if (RNA_enum_get(ptr, "image_type")== R_PNG) { - uiItemR(row, ptr, "quality", UI_ITEM_R_SLIDER, "Compression", ICON_NONE); - } - + + RNA_pointer_create(NULL, &RNA_ImageFormatSettings, &nif->im_format, &imfptr); + uiTemplateImageSettings(layout, &imfptr); + row= uiLayoutRow(layout, 1); uiItemR(row, ptr, "frame_start", 0, "Start", ICON_NONE); uiItemR(row, ptr, "frame_end", 0, "End", ICON_NONE); |