Anim: VSE: Add overlay to visualize scene strip range when using scene syncing
This adds an overlay to the animation editors to visualize the current scene strip in and out points in the scene timeline when the `Sync Scene Time` option in the sequencer is used. * Adds an overlay toggle + panel to the dopesheet. * Adds a new theme setting (for the overlay) under `Common` > `Animation` > `Scene Strip Range`. * Adds the overlay drawing to the dopesheet. Pull Request: https://projects.blender.org/blender/blender/pulls/146165
This commit is contained in:
@@ -283,6 +283,13 @@ class DOPESHEET_HT_editor_buttons:
|
||||
icon_only=True,
|
||||
panel="DOPESHEET_PT_proportional_edit",
|
||||
)
|
||||
overlays = st.overlays
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(overlays, "show_overlays", text="", icon='OVERLAY')
|
||||
sub = row.row(align=True)
|
||||
sub.popover(panel="DOPESHEET_PT_overlay", text="")
|
||||
sub.active = overlays.show_overlays
|
||||
|
||||
@classmethod
|
||||
def _draw_action_selector(cls, context, layout):
|
||||
@@ -1014,6 +1021,33 @@ class DOPESHEET_PT_ShapeKey(Panel):
|
||||
draw_shape_key_properties(context, self.layout)
|
||||
|
||||
|
||||
class DOPESHEET_PT_overlay(Panel):
|
||||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Overlays"
|
||||
bl_ui_units_x = 13
|
||||
|
||||
def draw(self, _context):
|
||||
pass
|
||||
|
||||
|
||||
class DOPESHEET_PT_dopesheet_overlay(Panel):
|
||||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_parent_id = "DOPESHEET_PT_overlay"
|
||||
bl_label = "Dope Sheet Overlays"
|
||||
|
||||
def draw(self, context):
|
||||
st = context.space_data
|
||||
overlay_settings = st.overlays
|
||||
layout = self.layout
|
||||
|
||||
layout.active = overlay_settings.show_overlays
|
||||
row = layout.row()
|
||||
row.active = context.workspace.use_scene_time_sync
|
||||
row.prop(overlay_settings, "show_scene_strip_range")
|
||||
|
||||
|
||||
classes = (
|
||||
DOPESHEET_HT_header,
|
||||
DOPESHEET_HT_playback_controls,
|
||||
@@ -1045,6 +1079,9 @@ classes = (
|
||||
DOPESHEET_PT_grease_pencil_layer_relations,
|
||||
DOPESHEET_PT_grease_pencil_layer_display,
|
||||
DOPESHEET_PT_ShapeKey,
|
||||
|
||||
DOPESHEET_PT_overlay,
|
||||
DOPESHEET_PT_dopesheet_overlay,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
||||
Reference in New Issue
Block a user