Fix T54360: FFMPEG bitrate not editable for all codecs

The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
This commit is contained in:
Sybren A. Stüvel 2018-03-22 14:46:57 +01:00
parent e35f964daa
commit cfe43f8d1a
Notes: blender-bot 2023-02-14 06:06:34 +01:00
Referenced by issue #54360, FFMPEG bitrate not editable for all codecs
1 changed files with 3 additions and 2 deletions

View File

@ -443,7 +443,8 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
layout.prop(ffmpeg, "use_lossless_output")
# Output quality
if needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}:
use_crf = needs_codec and ffmpeg.codec in {'H264', 'MPEG4'}
if use_crf:
layout.prop(ffmpeg, "constant_rate_factor")
# Encoding speed
@ -457,7 +458,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
pbox.prop(ffmpeg, "max_b_frames", text="")
pbox.enabled = ffmpeg.use_max_b_frames
if ffmpeg.constant_rate_factor == 'NONE':
if not use_crf or ffmpeg.constant_rate_factor == 'NONE':
split = layout.split()
col = split.column()
col.label(text="Rate:")