diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 23 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ad1b52bdfd7..17062b399cd 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -776,6 +776,20 @@ static void rna_Space_show_region_toolbar_update(bContext *C, PointerRNA *ptr) rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN); } +/* Channels Region. */ +static bool rna_Space_show_region_channels_get(PointerRNA *ptr) +{ + return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN); +} +static void rna_Space_show_region_channels_set(PointerRNA *ptr, bool value) +{ + rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN, !value); +} +static void rna_Space_show_region_channels_update(bContext *C, PointerRNA *ptr) +{ + rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN); +} + /* UI Region */ static bool rna_Space_show_region_ui_get(PointerRNA *ptr) { @@ -3214,6 +3228,10 @@ static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int regio region_type_mask &= ~(1 << RGN_TYPE_TOOLS); DEF_SHOW_REGION_PROPERTY(show_region_toolbar, "Toolbar", ""); } + if (region_type_mask & (1 << RGN_TYPE_CHANNELS)) { + region_type_mask &= ~(1 << RGN_TYPE_CHANNELS); + DEF_SHOW_REGION_PROPERTY(show_region_channels, "Channels", ""); + } if (region_type_mask & (1 << RGN_TYPE_UI)) { region_type_mask &= ~(1 << RGN_TYPE_UI); DEF_SHOW_REGION_PROPERTY(show_region_ui, "Sidebar", ""); @@ -7560,6 +7578,9 @@ static void rna_def_space_spreadsheet_context(BlenderRNA *brna) RNA_def_property_enum_items(prop, spreadsheet_context_type_items); RNA_def_property_ui_text(prop, "Type", "Type of the context"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + + rna_def_space_generic_show_region_toggles(srna, + (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER)); } static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna) @@ -7674,7 +7695,7 @@ static void rna_def_space_spreadsheet(BlenderRNA *brna) srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space"); RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data"); - rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_FOOTER)); + rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER) ); prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_PINNED); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 70c57119e2d..92d8b299099 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3864,6 +3864,7 @@ static void rna_def_userdef_theme_space_spreadsheet(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); rna_def_userdef_theme_spaces_main(srna); + rna_def_userdef_theme_spaces_list_main(srna); } static void rna_def_userdef_themes(BlenderRNA *brna) |