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/makesrna/intern/rna_userdef.c | |
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/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 684c331e14e..ccfc1222d4c 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3680,6 +3680,23 @@ static void rna_def_userdef_theme_collection_color(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } +static void rna_def_userdef_theme_strip_color(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "ThemeStripColor", NULL); + RNA_def_struct_sdna(srna, "ThemeStripColor"); + RNA_def_struct_clear_flag(srna, STRUCT_UNDO); + RNA_def_struct_ui_text(srna, "Theme Strip Color", "Theme settings for strip colors"); + + prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "color"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Color", "Strip Color"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); +} + static void rna_def_userdef_theme_space_clip(BlenderRNA *brna) { StructRNA *srna; @@ -4029,6 +4046,12 @@ static void rna_def_userdef_themes(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "collection_color", ""); RNA_def_property_struct_type(prop, "ThemeCollectionColor"); RNA_def_property_ui_text(prop, "Collection Color", ""); + + prop = RNA_def_property(srna, "strip_color", PROP_COLLECTION, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_collection_sdna(prop, NULL, "strip_color", ""); + RNA_def_property_struct_type(prop, "ThemeStripColor"); + RNA_def_property_ui_text(prop, "Strip Color", ""); } static void rna_def_userdef_addon(BlenderRNA *brna) @@ -4272,6 +4295,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna) rna_def_userdef_theme_space_spreadsheet(brna); rna_def_userdef_theme_colorset(brna); rna_def_userdef_theme_collection_color(brna); + rna_def_userdef_theme_strip_color(brna); rna_def_userdef_themes(brna); } |