Commit: fad80a95fd08ec87a37f30f0b94a7061d4e382f2 Author: Peter Fog Date: Tue Dec 15 23:15:32 2020 +0100 Branches: master https://developer.blender.org/rBfad80a95fd08ec87a37f30f0b94a7061d4e382f2
VSE: Add Overlay popover panels Add panels with overlay settings for strips and preview and overlay enable/disable button. Entries from the View menus moved to the overlay panels, which will simplify cluttered View menus. Additional options have been added: - Strip Name - Strip Source(ex. path) - Strip Duration So users can now select what info they need to see on the strips. When No text is displayed, waveforms are drawn in full height. Reviewed By: ISS, HooglyBoogly, pablovazquez Differential Revision: https://developer.blender.org/D9751 =================================================================== M release/scripts/startup/bl_ui/space_sequencer.py M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_290.c M source/blender/blenloader/intern/versioning_defaults.c M source/blender/editors/space_sequencer/sequencer_draw.c M source/blender/editors/space_sequencer/space_sequencer.c M source/blender/makesdna/DNA_space_types.h M source/blender/makesrna/intern/rna_space.c =================================================================== diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 3f92fce81f6..8ef961960ff 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -139,12 +139,11 @@ class SEQUENCER_HT_header(Header): SEQUENCER_MT_editor_menus.draw_collapsible(context, layout) - if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: + layout.separator_spacer() - layout.separator_spacer() + if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.prop(st, "display_mode", text="", icon_only=True) - layout.prop(st, "preview_channels", text="", icon_only=True) gpd = context.gpencil_data @@ -158,6 +157,13 @@ class SEQUENCER_HT_header(Header): row.prop(tool_settings, "proportional_edit_falloff", icon_only=True) + row = layout.row(align=True) + row.prop(st, "show_strip_overlay", text="", icon='OVERLAY') + sub = row.row(align=True) + sub.popover(panel="SEQUENCER_PT_overlay", text="") + sub.active = st.show_strip_overlay + + class SEQUENCER_MT_editor_menus(Menu): bl_idname = "SEQUENCER_MT_editor_menus" bl_label = "" @@ -176,6 +182,83 @@ class SEQUENCER_MT_editor_menus(Menu): layout.menu("SEQUENCER_MT_strip") +class SEQUENCER_PT_overlay(Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'HEADER' + bl_label = "Overlays" + bl_ui_units_x = 7 + + def draw(self, _context): + pass + + +class SEQUENCER_PT_overlay(Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'HEADER' + bl_label = "Overlays" + bl_ui_units_x = 7 + + def draw(self, _context): + pass + + +class SEQUENCER_PT_preview_overlay(Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'HEADER' + bl_parent_id = 'SEQUENCER_PT_overlay' + bl_label = "Preview Overlays" + + @classmethod + def poll(cls, context): + st = context.space_data + return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} and st.display_mode == 'IMAGE' + + + def draw(self, context): + ed = context.scene.sequence_editor + st = context.space_data + layout = self.layout + + layout.active = st.show_strip_overlay + layout.prop(ed, "show_overlay", text="Frame Overlay") + layout.prop(st, "show_safe_areas", text="Safe Areas") + layout.prop(st, "show_metadata", text="Metadata") + layout.prop(st, "show_annotation", text="Annotations") + + +class SEQUENCER_PT_sequencer_overlay(Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'HEADER' + bl_parent_id = 'SEQUENCER_PT_overlay' + bl_label = "Sequencer Overlays" + + @classmethod + def poll(cls, context): + st = context.space_data + return st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'} + + + def draw(self, context): + st = context.space_data + layout = self.layout + + layout.active = st.show_strip_overlay + + layout.prop(st, "show_strip_name", text="Name") + layout.prop(st, "show_strip_source", text="Source") + layout.prop(st, "show_strip_duration", text="Duration") + + layout.separator() + + layout.prop(st, "show_strip_offset", text="Offsets") + layout.prop(st, "show_fcurves", text="F-Curves") + + layout.separator() + + layout.prop_menu_enum(st, "waveform_display_type") + + + class SEQUENCER_MT_view_cache(Menu): bl_label = "Cache" @@ -294,6 +377,12 @@ class SEQUENCER_MT_view(Menu): layout.operator("view2d.zoom_border", text="Zoom") layout.menu("SEQUENCER_MT_preview_zoom") + if st.display_mode == 'IMAGE': + layout.prop(st, "use_zoom_to_fit") + elif st.display_mode == 'WAVEFORM': + layout.separator() + layout.prop(st, "show_separate_color", text="Show Separate Color Channels") + layout.separator() layout.menu("SEQUENCER_MT_proxy") @@ -318,22 +407,8 @@ class SEQUENCER_MT_view(Menu): layout.separator() layout.prop(st, "show_seconds") - layout.prop(st, "show_strip_offset") - layout.prop(st, "show_fcurves") layout.prop(st, "show_markers") layout.menu("SEQUENCER_MT_view_cache", text="Show Cache") - layout.prop_menu_enum(st, "waveform_display_type", text="Show Waveforms") - - if is_preview: - layout.separator() - if st.display_mode == 'IMAGE': - layout.prop(st, "use_zoom_to_fit") - layout.prop(ed, "show_overlay", text="Show Frame Overlay") - layout.prop(st, "show_safe_areas", text="Show Safe Areas") - layout.prop(st, "show_metadata", text="Show Metadata") - layout.prop(st, "show_annotation", text="Show Annotations") - elif st.display_mode == 'WAVEFORM': - layout.prop(st, "show_separate_color", text="Show Separate Color Channels") layout.separator() @@ -2222,6 +2297,10 @@ classes = ( SEQUENCER_PT_active_tool, SEQUENCER_PT_strip, + SEQUENCER_PT_overlay, + SEQUENCER_PT_preview_overlay, + SEQUENCER_PT_sequencer_overlay, + SEQUENCER_PT_effect, SEQUENCER_PT_scene, SEQUENCER_PT_mask, diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index afb6112b954..ca95ca8bda0 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 6 +#define BLENDER_FILE_SUBVERSION 7 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index d00c5225299..685bb762f29 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1234,18 +1234,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 292, 7)) { /* Make all IDProperties used as interface of geometry node trees overridable. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1301,5 +1290,31 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Overlay elements in the sequencer. */ + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype == SPACE_SEQ) { + SpaceSeq *sseq = (SpaceSeq *)sl; + sseq->flag |= (SEQ_SHOW_STRIP_OVERLAY | SEQ_SHOW_STRIP_NAME | SEQ_SHOW_STRIP_SOURCE | + SEQ_SHOW_STRIP_DURATION); + } + } + } + } + } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ } } diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index f89a5be27de..2d75b046366 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -182,7 +182,8 @@ static void blo_update_defaults_screen(bScreen *screen, } else if (area->spacetype == SPACE_SEQ) { SpaceSeq *seq = area->spacedata.first; - seq->flag |= SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES | SEQ_ZOOM_TO_FIT; + seq->flag |= SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES | SEQ_ZOOM_TO_FIT | SEQ_SHOW_STRIP_OVERLAY | + SEQ_SHOW_STRIP_SOURCE | SEQ_SHOW_STRIP_NAME | SEQ_SHOW_STRIP_DURATION; } else if (area->spacetype == SPACE_TEXT) { /* Show syntax and line numbers in Script workspace text editor. */ diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index e31fa3205ba..ac1b9e6d0a0 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -227,16 +227,16 @@ void color3ubv_from_seq(Scene *curscene, Sequence *seq, uchar col[3]) * \param x1, x2, y1, y2: The starting and end X value to draw the wave, same for y1 and y2. * \param stepsize: The width of a pixel. */ -static void draw_seq_waveform(View2D *v2d, - const bContext *C, - SpaceSeq *sseq, - Scene *scene, - Sequence *seq, - float x1, - float y1, - float x2, - float y2, - float stepsize) +static void draw_seq_waveform_overlay(View2D *v2d, + const bContext *C, + SpaceSeq *sseq, + Scene *scene, + Sequence *seq, + flo @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
