UI: Move OpenGL render operators to sub-menu

Move 3D Viewport and Sequencer OpenGL render operators into a
"Render Preview" sub-menu.

The goal is to make the operation more clear, and being able to add
new entries to render the active scene or Sequencer scene (handy when
using the new "Sync Scene").

This also reduces the length of the `View` menu which in some cases
can get quite long.

See PR for details and screenshots.

Resolves #146302

Pull Request: https://projects.blender.org/blender/blender/pulls/146316
This commit is contained in:
Pablo Vazquez
2025-09-16 10:44:29 +02:00
committed by Pablo Vazquez
parent 416b9990c8
commit fa6be590d9
2 changed files with 40 additions and 21 deletions

View File

@@ -457,6 +457,17 @@ class SEQUENCER_MT_proxy(Menu):
layout.prop(st, "proxy_render_size", text="")
class SEQUENCER_MT_view_render(Menu):
bl_label = "Render Preview"
def draw(self, _context):
layout = self.layout
layout.operator("render.opengl", text="Render Sequencer Image", icon='RENDER_STILL').sequencer = True
props = layout.operator("render.opengl", text="Render Sequencer Animation", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
class SEQUENCER_MT_view(Menu):
bl_label = "View"
@@ -536,10 +547,7 @@ class SEQUENCER_MT_view(Menu):
layout.menu("SEQUENCER_MT_range")
layout.separator()
layout.operator("render.opengl", text="Sequence Render Image", icon='RENDER_STILL').sequencer = True
props = layout.operator("render.opengl", text="Sequence Render Animation", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
layout.menu("SEQUENCER_MT_view_render")
layout.separator()
layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT')
@@ -3191,6 +3199,7 @@ classes = (
SEQUENCER_HT_playback_controls,
SEQUENCER_MT_editor_menus,
SEQUENCER_MT_range,
SEQUENCER_MT_view_render,
SEQUENCER_MT_view,
SEQUENCER_MT_preview_zoom,
SEQUENCER_MT_proxy,

View File

@@ -1481,23 +1481,7 @@ class VIEW3D_MT_view(Menu):
layout.separator()
layout.operator(
"render.opengl",
text="Viewport Render Image",
icon='RENDER_STILL',
)
layout.operator(
"render.opengl",
text="Viewport Render Animation",
icon='RENDER_ANIMATION',
).animation = True
props = layout.operator(
"render.opengl",
text="Viewport Render Keyframes",
)
props.animation = True
props.render_keyed_only = True
layout.menu("VIEW3D_MT_view_render")
layout.separator()
layout.menu("INFO_MT_area")
@@ -1655,6 +1639,31 @@ class VIEW3D_MT_view_regions(Menu):
layout.operator("view3d.clear_render_border")
class VIEW3D_MT_view_render(Menu):
bl_label = "Render Preview"
def draw(self, _context):
layout = self.layout
layout.operator(
"render.opengl",
text="Render Viewport Image",
icon='RENDER_STILL',
)
layout.operator(
"render.opengl",
text="Render Viewport Animation",
icon='RENDER_ANIMATION',
).animation = True
layout.separator()
props = layout.operator(
"render.opengl",
text="Render Viewport Keyframes",
)
props.animation = True
props.render_keyed_only = True
# ********** Select menus, suffix from context.mode **********
class VIEW3D_MT_select_object_more_less(Menu):
@@ -9119,6 +9128,7 @@ classes = (
VIEW3D_MT_view_align_selected,
VIEW3D_MT_view_viewpoint,
VIEW3D_MT_view_regions,
VIEW3D_MT_view_render,
VIEW3D_MT_select_object,
VIEW3D_MT_select_object_more_less,
VIEW3D_MT_select_pose,