Merge branch 'master' into blender2.8
[blender.git] / release / scripts / startup / bl_ui / properties_render.py
index 12b0df795c75991fdbab452c14ec98ed4b16ef79..ed926b51a9c147c6cd09da3da5ad6ba03e67a24a 100644 (file)
@@ -469,7 +469,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
@@ -483,7 +484,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:")