Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_render.py
| Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| rd = context.scene.render | rd = context.scene.render | ||||
| ffmpeg = rd.ffmpeg | ffmpeg = rd.ffmpeg | ||||
| layout.menu("RENDER_MT_ffmpeg_presets", text="Presets") | layout.menu("RENDER_MT_ffmpeg_presets", text="Presets") | ||||
| split = layout.split() | split = layout.split() | ||||
| split.prop(rd.ffmpeg, "format") | split.prop(rd.ffmpeg, "format") | ||||
| if ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'}: | split.prop(ffmpeg, "use_autosplit") | ||||
| split.prop(ffmpeg, "codec") | |||||
| if ffmpeg.codec == 'H264': | |||||
| row = layout.row() | |||||
| row.label() | |||||
| row.prop(ffmpeg, "use_lossless_output") | |||||
| elif rd.ffmpeg.format == 'H264': | |||||
| split.prop(ffmpeg, "use_lossless_output") | |||||
| else: | |||||
| split.label() | |||||
| layout.separator() | |||||
| needs_codec = ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'} | |||||
| if needs_codec: | |||||
| layout.prop(ffmpeg, "codec") | |||||
| if ffmpeg.codec in {'DNXHD'}: | |||||
| layout.prop(ffmpeg, "use_lossless_output") | |||||
| # Output quality | |||||
| if needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}: | |||||
| layout.prop(ffmpeg, "constant_rate_factor") | |||||
| # Encoding speed | |||||
| layout.prop(ffmpeg, "ffmpeg_preset") | |||||
| # I-frames | |||||
| layout.prop(ffmpeg, "gopsize") | |||||
| # B-Frames | |||||
| row = layout.row() | row = layout.row() | ||||
| row.prop(ffmpeg, "video_bitrate") | row.prop(ffmpeg, "use_max_b_frames", text='Max B-frames') | ||||
| row.prop(ffmpeg, "gopsize") | pbox = row.split() | ||||
| pbox.prop(ffmpeg, "max_b_frames", text='') | |||||
| pbox.enabled = ffmpeg.use_max_b_frames | |||||
| split = layout.split() | split = layout.split() | ||||
| split.enabled = ffmpeg.constant_rate_factor == 'NONE' | |||||
| col = split.column() | col = split.column() | ||||
| col.label(text="Rate:") | col.label(text="Rate:") | ||||
| col.prop(ffmpeg, "video_bitrate") | |||||
| col.prop(ffmpeg, "minrate", text="Minimum") | col.prop(ffmpeg, "minrate", text="Minimum") | ||||
| col.prop(ffmpeg, "maxrate", text="Maximum") | col.prop(ffmpeg, "maxrate", text="Maximum") | ||||
| col.prop(ffmpeg, "buffersize", text="Buffer") | col.prop(ffmpeg, "buffersize", text="Buffer") | ||||
| col = split.column() | col = split.column() | ||||
| col.prop(ffmpeg, "use_autosplit") | |||||
| col.label(text="Mux:") | col.label(text="Mux:") | ||||
| col.prop(ffmpeg, "muxrate", text="Rate") | col.prop(ffmpeg, "muxrate", text="Rate") | ||||
| col.prop(ffmpeg, "packetsize", text="Packet Size") | col.prop(ffmpeg, "packetsize", text="Packet Size") | ||||
| layout.separator() | layout.separator() | ||||
| # Audio: | # Audio: | ||||
| if ffmpeg.format != 'MP3': | if ffmpeg.format != 'MP3': | ||||
| layout.prop(ffmpeg, "audio_codec", text="Audio Codec") | layout.prop(ffmpeg, "audio_codec", text="Audio Codec") | ||||
| row = layout.row() | row = layout.row() | ||||
| row.enabled = ffmpeg.audio_codec != 'NONE' | |||||
| row.prop(ffmpeg, "audio_bitrate") | row.prop(ffmpeg, "audio_bitrate") | ||||
| row.prop(ffmpeg, "audio_volume", slider=True) | row.prop(ffmpeg, "audio_volume", slider=True) | ||||
| class RENDER_PT_bake(RenderButtonsPanel, Panel): | class RENDER_PT_bake(RenderButtonsPanel, Panel): | ||||
| bl_label = "Bake" | bl_label = "Bake" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||