diff options
author | Falk David <filedescriptor> | 2021-09-29 15:29:32 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-09-29 15:34:01 +0300 |
commit | 5cebcb415e76aaff74bc03c66414aa93b5c90e70 (patch) | |
tree | 3f5ab94862ce9a0f5e89e974ae4851135ae495b7 /release/scripts/startup/bl_ui/space_userpref.py | |
parent | ffb9577ac9a4c79483941389a052284b64930c8e (diff) |
VSE: Add color tags to strips
This patch adds color tags to VSE strips, an overlay option to toggle the colors
on and off, a section in the theme settings to define the 9 possible colors and
two ways of changing the color tag through the UI. You can change the color
through the right-click context menu, or in the strip side panel next to the
strip name.
Color tags are defined in user preferences and they can be disabled in overlay
settings.
Reviewed By: campbellbarton, ISS
Differential Revision: https://developer.blender.org/D12405
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 6efac235359..7a8b6d42cad 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1073,6 +1073,25 @@ class USERPREF_PT_theme_collection_colors(ThemePanel, CenterAlignMixIn, Panel): flow.prop(ui, "color", text=iface_("Color %d") % i, translate=False) +class USERPREF_PT_theme_strip_colors(ThemePanel, CenterAlignMixIn, Panel): + bl_label = "Strip Colors" + bl_options = {'DEFAULT_CLOSED'} + + def draw_header(self, _context): + layout = self.layout + + layout.label(icon='SEQ_STRIP_DUPLICATE') + + def draw_centered(self, context, layout): + theme = context.preferences.themes[0] + + layout.use_property_split = True + + flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) + for i, ui in enumerate(theme.strip_color, 1): + flow.prop(ui, "color", text=iface_("Color %d") % i, translate=False) + + # Base class for dynamically defined theme-space panels. # This is not registered. class PreferenceThemeSpacePanel: @@ -2348,6 +2367,7 @@ classes = ( USERPREF_PT_theme_text_style, USERPREF_PT_theme_bone_color_sets, USERPREF_PT_theme_collection_colors, + USERPREF_PT_theme_strip_colors, USERPREF_PT_file_paths_data, USERPREF_PT_file_paths_render, |