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 /source/blender/makesdna | |
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 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_sequence_types.h | 20 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 8 |
3 files changed, 28 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 86369ff7684..828702f9aa8 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -232,6 +232,10 @@ typedef struct Sequence { int blend_mode; float blend_opacity; + /* Tag color showed if `SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG` is set. */ + int16_t color_tag; + char _pad4[6]; + /* is sfra needed anymore? - it looks like its only used in one place */ /** Starting frame according to the timeline of the scene. */ int sfra; @@ -727,6 +731,22 @@ enum { SEQ_CACHE_STORE_THUMBNAIL = (1 << 12), }; +/* Sequence->color_tag. */ +typedef enum SequenceColorTag { + SEQUENCE_COLOR_NONE = -1, + SEQUENCE_COLOR_01, + SEQUENCE_COLOR_02, + SEQUENCE_COLOR_03, + SEQUENCE_COLOR_04, + SEQUENCE_COLOR_05, + SEQUENCE_COLOR_06, + SEQUENCE_COLOR_07, + SEQUENCE_COLOR_08, + SEQUENCE_COLOR_09, + + SEQUENCE_COLOR_TOT, +} SequenceColorTag; + #ifdef __cplusplus } #endif diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index a8f21e597c5..a7fcf2cfb89 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -599,6 +599,7 @@ typedef struct SequencerTimelineOverlay { typedef enum eSpaceSeq_SequencerTimelineOverlay_Flag { SEQ_TIMELINE_SHOW_STRIP_OFFSETS = (1 << 1), SEQ_TIMELINE_SHOW_THUMBNAILS = (1 << 2), + SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG = (1 << 3), /* use Sequence->color_tag */ SEQ_TIMELINE_SHOW_FCURVES = (1 << 5), SEQ_TIMELINE_ALL_WAVEFORMS = (1 << 7), /* draw all waveforms */ SEQ_TIMELINE_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 247f67f6b95..291f6de5ba2 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -458,6 +458,10 @@ typedef struct ThemeCollectionColor { unsigned char color[4]; } ThemeCollectionColor; +typedef struct ThemeStripColor { + unsigned char color[4]; +} ThemeStripColor; + /** * A theme. * @@ -500,8 +504,10 @@ typedef struct bTheme { /* See COLLECTION_COLOR_TOT for the number of collection colors. */ ThemeCollectionColor collection_color[8]; + /* See SEQUENCE_COLOR_TOT for the total number of strip colors. */ + ThemeStripColor strip_color[9]; + int active_theme_area; - char _pad0[4]; } bTheme; #define UI_THEMESPACE_START(btheme) \ |