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:
Diffstat (limited to 'source/blender/editors/space_image/image_buttons.c')
-rw-r--r--source/blender/editors/space_image/image_buttons.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index df5c8d4c7cd..48627e9d1ed 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -817,6 +817,74 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
MEM_freeN(cb);
}
+void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
+{
+ ImageFormatData *imf= imfptr->data;
+ ID *id= imfptr->id.data;
+ const int depth_ok= BKE_imtype_is_depth_ok(imf->imtype);
+ /* some settings depend on this being a scene thats rendered */
+ const short is_render_out= (id && GS(id->name) == ID_SCE);
+
+ uiLayout *col, *row;
+
+ col= uiLayoutColumn(layout, 0);
+
+ uiItemR(col, imfptr, "file_format", 0, "", ICON_NONE);
+
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, imfptr, "color_mode", UI_ITEM_R_EXPAND, "Color", ICON_NONE);
+
+ /* only display depth setting if multiple depths can be used */
+ if((ELEM6(depth_ok,
+ R_IMF_CHAN_DEPTH_1,
+ R_IMF_CHAN_DEPTH_8,
+ R_IMF_CHAN_DEPTH_12,
+ R_IMF_CHAN_DEPTH_16,
+ R_IMF_CHAN_DEPTH_24,
+ R_IMF_CHAN_DEPTH_32)) == 0)
+ {
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_is_quality_ok(imf->imtype)) {
+ uiItemR(col, imfptr, "quality", 0, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_is_compression_ok(imf->imtype)) {
+ uiItemR(col, imfptr, "compression", 0, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_is_zbuf_ok(imf->imtype)) {
+ uiItemR(col, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
+ }
+
+ if (ELEM(imf->imtype, R_OPENEXR, R_MULTILAYER)) {
+ uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE);
+
+ if (is_render_out && (imf->imtype == R_OPENEXR)) {
+ uiItemR(col, imfptr, "use_preview", 0, NULL, ICON_NONE);
+ }
+ }
+
+ if (imf->imtype == R_JP2) {
+ uiItemR(col, imfptr, "use_jpeg2k_ycc", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE);
+ }
+
+ if (imf->imtype == R_CINEON) {
+#if 1
+ uiItemL(col, "FIXME: hard coded Non-Linear, Gamma:1.0", ICON_NONE);
+#else
+ uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_black", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_white", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_gamma", 0, NULL, ICON_NONE);
+#endif
+ }
+}
+
void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
{
Scene *scene= CTX_data_scene(C);