UI: reorganize render output and encoding panels for single columns.
This will look a bit better once horizontal expanded enums work.
This commit is contained in:
parent
f1f99c4991
commit
cdd8a430d3
|
@ -299,22 +299,44 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
|
|||
|
||||
layout.use_property_split = True
|
||||
|
||||
col = layout.column(align=True)
|
||||
sub = col.column(align=True)
|
||||
sub.active = not rd.is_movie_format
|
||||
sub.prop(rd, "use_overwrite")
|
||||
sub.prop(rd, "use_placeholder")
|
||||
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
||||
|
||||
col = flow.column()
|
||||
col.active = not rd.is_movie_format
|
||||
col.prop(rd, "use_overwrite")
|
||||
col = flow.column()
|
||||
col.active = not rd.is_movie_format
|
||||
col.prop(rd, "use_placeholder")
|
||||
col = flow.column()
|
||||
col.prop(rd, "use_file_extension")
|
||||
col = flow.column()
|
||||
col.prop(rd, "use_render_cache")
|
||||
|
||||
layout.use_property_split = False
|
||||
layout.template_image_settings(image_settings, color_management=False)
|
||||
if rd.use_multiview:
|
||||
layout.template_image_views(image_settings)
|
||||
|
||||
|
||||
class RENDER_PT_output_views(RenderButtonsPanel, Panel):
|
||||
bl_label = "Views"
|
||||
bl_parent_id = "RENDER_PT_output"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||
|
||||
@classmethod
|
||||
def poll(self, context):
|
||||
rd = context.scene.render
|
||||
return rd.use_multiview
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = False
|
||||
layout.use_property_decorate = False # No animation.
|
||||
|
||||
rd = context.scene.render
|
||||
layout.template_image_views(rd.image_settings)
|
||||
|
||||
|
||||
class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
||||
bl_label = "Encoding"
|
||||
bl_parent_id ="RENDER_PT_output"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||
|
||||
|
@ -328,27 +350,35 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
|||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
rd = context.scene.render
|
||||
ffmpeg = rd.ffmpeg
|
||||
|
||||
split = layout.split()
|
||||
split.prop(rd.ffmpeg, "format")
|
||||
split.prop(ffmpeg, "use_autosplit")
|
||||
layout.prop(rd.ffmpeg, "format")
|
||||
layout.prop(ffmpeg, "use_autosplit")
|
||||
|
||||
class RENDER_PT_encoding_video(RenderButtonsPanel, Panel):
|
||||
bl_label = "Video"
|
||||
bl_parent_id ="RENDER_PT_encoding"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return rd.image_settings.file_format in {'FFMPEG', 'XVID', 'H264', 'THEORA'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
rd = context.scene.render
|
||||
ffmpeg = rd.ffmpeg
|
||||
|
||||
# Video:
|
||||
layout.separator()
|
||||
self.draw_vcodec(context)
|
||||
|
||||
# Audio:
|
||||
layout.separator()
|
||||
if ffmpeg.format != 'MP3':
|
||||
layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
|
||||
|
||||
if ffmpeg.audio_codec != 'NONE':
|
||||
row = layout.row()
|
||||
row.prop(ffmpeg, "audio_bitrate")
|
||||
row.prop(ffmpeg, "audio_volume", slider=True)
|
||||
|
||||
def draw_vcodec(self, context):
|
||||
"""Video codec options."""
|
||||
|
@ -375,25 +405,52 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
|||
# I-frames
|
||||
layout.prop(ffmpeg, "gopsize")
|
||||
# B-Frames
|
||||
row = layout.row()
|
||||
row.prop(ffmpeg, "use_max_b_frames", text="Max B-frames")
|
||||
pbox = row.split()
|
||||
split = layout.split(factor=0.5)
|
||||
split.prop(ffmpeg, "use_max_b_frames", text="Max B-frames")
|
||||
pbox = split.column()
|
||||
pbox.prop(ffmpeg, "max_b_frames", text="")
|
||||
pbox.enabled = ffmpeg.use_max_b_frames
|
||||
|
||||
if not use_crf or ffmpeg.constant_rate_factor == 'NONE':
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.label(text="Rate:")
|
||||
col.prop(ffmpeg, "video_bitrate")
|
||||
col.prop(ffmpeg, "minrate", text="Minimum")
|
||||
col.prop(ffmpeg, "maxrate", text="Maximum")
|
||||
col = layout.column()
|
||||
|
||||
sub = col.column(align=True)
|
||||
sub.prop(ffmpeg, "video_bitrate")
|
||||
sub.prop(ffmpeg, "minrate", text="Minimum")
|
||||
sub.prop(ffmpeg, "maxrate", text="Maximum")
|
||||
|
||||
col.prop(ffmpeg, "buffersize", text="Buffer")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Mux:")
|
||||
col.prop(ffmpeg, "muxrate", text="Rate")
|
||||
col.prop(ffmpeg, "packetsize", text="Packet Size")
|
||||
col.separator()
|
||||
|
||||
col.prop(ffmpeg, "muxrate", text="Mux Rate")
|
||||
col.prop(ffmpeg, "packetsize", text="Mux Packet Size")
|
||||
|
||||
|
||||
class RENDER_PT_encoding_audio(RenderButtonsPanel, Panel):
|
||||
bl_label = "Audio"
|
||||
bl_parent_id ="RENDER_PT_encoding"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return rd.image_settings.file_format in {'FFMPEG', 'XVID', 'H264', 'THEORA'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
rd = context.scene.render
|
||||
ffmpeg = rd.ffmpeg
|
||||
|
||||
if ffmpeg.format != 'MP3':
|
||||
layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
|
||||
|
||||
if ffmpeg.audio_codec != 'NONE':
|
||||
layout.prop(ffmpeg, "audio_bitrate")
|
||||
layout.prop(ffmpeg, "audio_volume", slider=True)
|
||||
|
||||
|
||||
class RENDER_UL_renderviews(UIList):
|
||||
|
@ -877,7 +934,10 @@ classes = (
|
|||
RENDER_PT_frame_remapping,
|
||||
RENDER_PT_post_processing,
|
||||
RENDER_PT_output,
|
||||
RENDER_PT_output_views,
|
||||
RENDER_PT_encoding,
|
||||
RENDER_PT_encoding_video,
|
||||
RENDER_PT_encoding_audio,
|
||||
RENDER_PT_stamp,
|
||||
RENDER_PT_stamp_burn,
|
||||
RENDER_UL_renderviews,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue