diff options
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 31 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 |
2 files changed, 25 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 3e6de3503d9..32f01690c5d 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -434,12 +434,32 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel): split.prop(rd.ffmpeg, "format") split.prop(ffmpeg, "use_autosplit") + # 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.""" + layout = self.layout + ffmpeg = context.scene.render.ffmpeg needs_codec = ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'} if needs_codec: layout.prop(ffmpeg, "codec") + if needs_codec and ffmpeg.codec == 'NONE': + return + if ffmpeg.codec in {'DNXHD'}: layout.prop(ffmpeg, "use_lossless_output") @@ -473,17 +493,6 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel): col.prop(ffmpeg, "muxrate", text="Rate") col.prop(ffmpeg, "packetsize", text="Packet Size") - layout.separator() - - # Audio: - 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) - class RENDER_PT_bake(RenderButtonsPanel, Panel): bl_label = "Bake" diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 2cfe0666fbf..1dfa19fb65a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5445,7 +5445,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) }; static const EnumPropertyItem ffmpeg_codec_items[] = { - {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, + {AV_CODEC_ID_NONE, "NONE", 0, "No Video", "Disables video output, for audio-only renders"}, {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""}, {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""}, {AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""}, @@ -5475,8 +5475,8 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) }; static const EnumPropertyItem ffmpeg_crf_items[] = { - {FFM_CRF_NONE, "NONE", 0, "None; use custom bitrate", - "Use constant bit rate, rather than constant output quality"}, + {FFM_CRF_NONE, "NONE", 0, "Constant Bitrate", + "Configure constant bit rate, rather than constant output quality"}, {FFM_CRF_LOSSLESS, "LOSSLESS", 0, "Lossless", ""}, {FFM_CRF_PERC_LOSSLESS, "PERC_LOSSLESS", 0, "Perceptually lossless", ""}, {FFM_CRF_HIGH, "HIGH", 0, "High quality", ""}, @@ -5488,7 +5488,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) }; static const EnumPropertyItem ffmpeg_audio_codec_items[] = { - {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, + {AV_CODEC_ID_NONE, "NONE", 0, "No Audio", "Disables audio output, for video-only renders"}, {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""}, {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""}, {AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""}, @@ -5527,7 +5527,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, ffmpeg_codec_items); RNA_def_property_enum_default(prop, AV_CODEC_ID_H264); - RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use"); + RNA_def_property_ui_text(prop, "Video Codec", "FFmpeg codec to use for video output"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE); |