diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_output.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_output.py | 64 |
1 files changed, 39 insertions, 25 deletions
diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index bd96152204a..3d810a55b0e 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -54,21 +54,18 @@ class RenderOutputButtonsPanel: return (context.engine in cls.COMPAT_ENGINES) -class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): - bl_label = "Dimensions" +class RENDER_PT_format(RenderOutputButtonsPanel, Panel): + bl_label = "Project Format" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - _frame_rate_args_prev = None _preset_class = None - - def draw_header_preset(self, context): - RENDER_PT_presets.draw_panel_header(self.layout) + _frame_rate_args_prev = None @staticmethod def _draw_framerate_label(*args): # avoids re-creating text string each draw - if RENDER_PT_dimensions._frame_rate_args_prev == args: - return RENDER_PT_dimensions._frame_rate_ret + if RENDER_PT_format._frame_rate_args_prev == args: + return RENDER_PT_format._frame_rate_ret fps, fps_base, preset_label = args @@ -87,17 +84,17 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): fps_label_text = f"{fps_rate!r} fps" show_framerate = (preset_label == "Custom") - RENDER_PT_dimensions._frame_rate_args_prev = args - RENDER_PT_dimensions._frame_rate_ret = args = (fps_label_text, show_framerate) + RENDER_PT_format._frame_rate_args_prev = args + RENDER_PT_format._frame_rate_ret = args = (fps_label_text, show_framerate) return args @staticmethod def draw_framerate(layout, sub, rd): - if RENDER_PT_dimensions._preset_class is None: - RENDER_PT_dimensions._preset_class = bpy.types.RENDER_MT_framerate_presets + if RENDER_PT_format._preset_class is None: + RENDER_PT_format._preset_class = bpy.types.RENDER_MT_framerate_presets - args = rd.fps, rd.fps_base, RENDER_PT_dimensions._preset_class.bl_label - fps_label_text, show_framerate = RENDER_PT_dimensions._draw_framerate_label(*args) + args = rd.fps, rd.fps_base, RENDER_PT_format._preset_class.bl_label + fps_label_text, show_framerate = RENDER_PT_format._draw_framerate_label(*args) sub.menu("RENDER_MT_framerate_presets", text=fps_label_text) @@ -106,6 +103,9 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): col.prop(rd, "fps") col.prop(rd, "fps_base", text="Base") + def draw_header_preset(self, context): + RENDER_PT_presets.draw_panel_header(self.layout) + def draw(self, context): layout = self.layout layout.use_property_split = True @@ -120,7 +120,7 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): col.prop(rd, "resolution_percentage", text="%") col = layout.column(align=True) - col.prop(rd, "pixel_aspect_x", text="Aspect X") + col.prop(rd, "pixel_aspect_x", text="Aspect Ratio X") col.prop(rd, "pixel_aspect_y", text="Y") col = layout.column(align=True) @@ -129,20 +129,33 @@ class RENDER_PT_dimensions(RenderOutputButtonsPanel, Panel): sub.active = rd.use_border sub.prop(rd, "use_crop_to_border") - col = layout.column(align=True) - col.prop(scene, "frame_start", text="Frame Start") - col.prop(scene, "frame_end", text="End") - col.prop(scene, "frame_step", text="Step") - col = layout.split() col.alignment = 'RIGHT' col.label(text="Frame Rate") self.draw_framerate(layout, col, rd) -class RENDER_PT_frame_remapping(RenderOutputButtonsPanel, Panel): - bl_label = "Time Remapping" - bl_parent_id = "RENDER_PT_dimensions" +class RENDER_PT_frame_range(RenderOutputButtonsPanel, Panel): + bl_label = "Frame Range" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + scene = context.scene + rd = scene.render + + col = layout.column(align=True) + col.prop(scene, "frame_start", text="Frame Start") + col.prop(scene, "frame_end", text="End") + col.prop(scene, "frame_step", text="Step") + + +class RENDER_PT_time_frame_remapping(RenderOutputButtonsPanel, Panel): + bl_label = "Time Stretching" + bl_parent_id = "RENDER_PT_frame_range" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @@ -504,8 +517,9 @@ classes = ( RENDER_PT_presets, RENDER_PT_ffmpeg_presets, RENDER_MT_framerate_presets, - RENDER_PT_dimensions, - RENDER_PT_frame_remapping, + RENDER_PT_format, + RENDER_PT_frame_range, + RENDER_PT_time_frame_remapping, RENDER_PT_output, RENDER_PT_output_views, RENDER_PT_encoding, |