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:
authorWilliam Reynish <billreynish>2018-09-03 18:23:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-03 18:51:04 +0300
commitcdd8a430d3aab012cf896b7b1a21e5d53aea0c0d (patch)
treec1277dd6c006b9d5f2c373836b379eb9ab3d1e57 /source/blender/editors/space_image
parentf1f99c4991ff953447cba3427879923fd261cb26 (diff)
UI: reorganize render output and encoding panels for single columns.
This will look a bit better once horizontal expanded enums work.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_buttons.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index afcae7a27ab..9dd84df237d 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1054,16 +1054,16 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_ma
/* some settings depend on this being a scene thats rendered */
const bool is_render_out = (id && GS(id->name) == ID_SCE);
- uiLayout *col, *row, *split, *sub;
+ uiLayout *col;
bool show_preview = false;
col = uiLayoutColumn(layout, false);
- split = uiLayoutSplit(col, 0.5f, false);
+ uiLayoutSetPropSep(col, true);
+ uiLayoutSetPropDecorate(col, false);
- uiItemR(split, imfptr, "file_format", 0, "", ICON_NONE);
- sub = uiLayoutRow(split, false);
- uiItemR(sub, imfptr, "color_mode", UI_ITEM_R_EXPAND, IFACE_("Color"), ICON_NONE);
+ uiItemR(col, imfptr, "file_format", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "color_mode", UI_ITEM_R_EXPAND, IFACE_("Color"), ICON_NONE);
/* only display depth setting if multiple depths can be used */
if ((ELEM(depth_ok,
@@ -1075,10 +1075,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_ma
R_IMF_CHAN_DEPTH_24,
R_IMF_CHAN_DEPTH_32)) == 0)
{
- row = uiLayoutRow(col, false);
-
- uiItemL(row, IFACE_("Color Depth:"), ICON_NONE);
- uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
if (BKE_imtype_supports_quality(imf->imtype)) {
@@ -1093,22 +1090,20 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_ma
uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE);
}
- row = uiLayoutRow(col, false);
if (BKE_imtype_supports_zbuf(imf->imtype)) {
- uiItemR(row, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
}
if (is_render_out && ELEM(imf->imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
show_preview = true;
- uiItemR(row, imfptr, "use_preview", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_preview", 0, NULL, ICON_NONE);
}
if (imf->imtype == R_IMF_IMTYPE_JP2) {
uiItemR(col, imfptr, "jpeg2k_codec", 0, NULL, ICON_NONE);
- row = uiLayoutRow(col, false);
- uiItemR(row, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE);
- uiItemR(row, imfptr, "use_jpeg2k_cinema_48", 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);
uiItemR(col, imfptr, "use_jpeg2k_ycc", 0, NULL, ICON_NONE);
}
@@ -1184,17 +1179,19 @@ void uiTemplateImageStereo3d(uiLayout *layout, PointerRNA *stereo3d_format_ptr)
static void uiTemplateViewsFormat(uiLayout *layout, PointerRNA *ptr, PointerRNA *stereo3d_format_ptr)
{
- uiLayout *col, *box;
+ uiLayout *col;
col = uiLayoutColumn(layout, false);
- uiItemL(col, IFACE_("Views Format:"), ICON_NONE);
- uiItemR(uiLayoutRow(col, false), ptr, "views_format", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiLayoutSetPropSep(col, true);
+ uiLayoutSetPropDecorate(col, false);
- if (stereo3d_format_ptr) {
- box = uiLayoutBox(col);
- uiLayoutSetActive(box, RNA_enum_get(ptr, "views_format") == R_IMF_VIEWS_STEREO_3D);
- uiTemplateImageStereo3d(box, stereo3d_format_ptr);
+ uiItemR(col, ptr, "views_format", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+
+ if (stereo3d_format_ptr &&
+ RNA_enum_get(ptr, "views_format") == R_IMF_VIEWS_STEREO_3D)
+ {
+ uiTemplateImageStereo3d(col, stereo3d_format_ptr);
}
}