Fix T53276: encoding output quality UI clarification.
[blender-staging.git] / release / scripts / startup / bl_ui / properties_render.py
index 2f3adf546b8fcf92ab47efd76a586e65980f8771..8093746c646ed79c4bfc749340e8c97869f4105c 100644 (file)
@@ -457,19 +457,19 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
         pbox.prop(ffmpeg, "max_b_frames", text="")
         pbox.enabled = ffmpeg.use_max_b_frames
 
-        split = layout.split()
-        split.enabled = ffmpeg.constant_rate_factor == 'NONE'
-        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.prop(ffmpeg, "buffersize", text="Buffer")
+        if 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.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 = split.column()
+            col.label(text="Mux:")
+            col.prop(ffmpeg, "muxrate", text="Rate")
+            col.prop(ffmpeg, "packetsize", text="Packet Size")
 
         layout.separator()
 
@@ -477,10 +477,10 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
         if ffmpeg.format != 'MP3':
             layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
 
-        row = layout.row()
-        row.enabled = ffmpeg.audio_codec != 'NONE'
-        row.prop(ffmpeg, "audio_bitrate")
-        row.prop(ffmpeg, "audio_volume", slider=True)
+        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):