diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-08-15 11:21:04 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-08-16 16:02:09 +0300 |
commit | 078d02f55743cd34c51c4dd7ca710b22441a12da (patch) | |
tree | d615010391448947904fb44d47e7defb666709ef /source | |
parent | ecc3b033a7d2bc71f3c75cd8152a647d18457ba1 (diff) |
User Preferences: Added "Enabled add-ons only" preference
This checkbox replaces the "Disabled" and "Enabled" entries in the
filter drop-down. As a result, it now takes a single click to limit the
shown entries to enabled add-ons only. This is also an actual flag in
the preferences, and thus its state is saved between runs on Blender (in
contrast to the filter, which is always reset to "All").
Reviewed by: brecht, billreynish
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index b8914c7a74f..3cb96ce8bf8 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -868,6 +868,7 @@ typedef enum eUserPref_Flag { USER_NONEGFRAMES = (1 << 24), USER_TXT_TABSTOSPACES_DISABLE = (1 << 25), USER_TOOLTIPS_PYTHON = (1 << 26), + USER_ADDONS_ENABLED_ONLY = (1 << 27), } eUserPref_Flag; typedef enum eUserPref_PrefFlag { diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a449ed850e9..77ca48fc05d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4090,6 +4090,12 @@ static void rna_def_userdef_view(BlenderRNA *brna) "Show the frames per second screen refresh rate, while animation is played back"); RNA_def_property_update(prop, 0, "rna_userdef_update"); + prop = RNA_def_property(srna, "show_addons_enabled_only", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADDONS_ENABLED_ONLY); + RNA_def_property_ui_text(prop, + "Enabled Add-ons Only", + "Only show enabled add-ons. Un-check to see all installed add-ons"); + static const EnumPropertyItem factor_display_items[] = { {USER_FACTOR_AS_FACTOR, "FACTOR", 0, "Factor", "Display factors as values between 0 and 1"}, {USER_FACTOR_AS_PERCENTAGE, "PERCENTAGE", 0, "Percentage", "Display factors as percentages"}, |