UI: Add Footer to Animation & VSE Editors

Add a footer region which contains essentially the playback and frame
range buttons from the Timeline Editor, to the following editors:
- Dope Sheet
- Graph
- NLA
- Sequencer

Available in the View menu in each editor, hidden by default.

The motivation is to provide a convenient way to access these
often used controls, and in the near future adjust these footers
to add more playback functionality related to each editor.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/135697
This commit is contained in:
Pablo Vazquez
2025-06-19 15:54:53 +02:00
committed by Pablo Vazquez
parent 5bfee02df3
commit 35bcbad7e9
13 changed files with 328 additions and 96 deletions

View File

@@ -8,6 +8,7 @@ from bl_ui.space_dopesheet import (
DopesheetFilterPopoverBase,
dopesheet_filter,
)
from bl_ui.space_time import playback_controls
from bl_ui.utils import (
PlayheadSnappingPanel,
)
@@ -17,6 +18,27 @@ class GRAPH_PT_playhead_snapping(PlayheadSnappingPanel, Panel):
bl_space_type = 'GRAPH_EDITOR'
def drivers_editor_footer(layout, context):
act_fcurve = context.active_editable_fcurve
if not act_fcurve:
return
act_driver = act_fcurve.driver
if not act_driver:
return
layout.separator_spacer()
layout.label(text="Driver: {!s} ({!s})".format(act_fcurve.id_data.name, act_fcurve.data_path))
if act_driver.variables:
layout.separator(type='LINE')
layout.label(text="Variables: %i" % len(act_driver.variables))
if act_driver.type == 'SCRIPTED' and act_driver.expression:
layout.separator(type='LINE')
layout.label(text="Expression: %s" % act_driver.expression)
class GRAPH_HT_header(Header):
bl_space_type = 'GRAPH_EDITOR'
@@ -87,6 +109,20 @@ class GRAPH_HT_header(Header):
)
class GRAPH_HT_playback_controls(Header):
bl_space_type = 'GRAPH_EDITOR'
bl_region_type = 'FOOTER'
def draw(self, context):
layout = self.layout
is_drivers_editor = context.space_data.mode == 'DRIVERS'
if is_drivers_editor:
drivers_editor_footer(layout, context)
else:
playback_controls(layout, context)
class GRAPH_PT_proportional_edit(Panel):
bl_space_type = 'GRAPH_EDITOR'
bl_region_type = 'HEADER'
@@ -178,6 +214,7 @@ class GRAPH_MT_view(Menu):
layout.prop(st, "show_region_ui")
layout.prop(st, "show_region_hud")
layout.prop(st, "show_region_channels")
layout.prop(st, "show_region_footer")
layout.separator()
layout.operator("graph.view_selected")
@@ -549,6 +586,7 @@ class GRAPH_MT_snap_pie(Menu):
classes = (
GRAPH_HT_header,
GRAPH_HT_playback_controls,
GRAPH_PT_proportional_edit,
GRAPH_MT_editor_menus,
GRAPH_MT_view,