Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-01 10:17:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-01 10:17:59 +0400
commit2de9ce794015181c7c6ff9fdaddc166b067399db (patch)
tree8819628127703f475a479aefed5f5a96b999ce96 /source/blender/makesrna/intern
parent2de8dfd7847205aae15831c662aa067f8647bd3a (diff)
keymap filter by keybindings in the userpreferences.
- optional, select between name/keybinding. - when key input can't be parsed, alert red to give the user some feedback. - key shortcut parsing could be improved or swapped out for button which grabs shortcut.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_space.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 6db863a267b..1f2cf469c5e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3054,13 +3054,24 @@ static void rna_def_space_info(BlenderRNA *brna)
static void rna_def_space_userpref(BlenderRNA *brna)
{
+ static EnumPropertyItem filter_type_items[] = {
+ {0, "NAME", 0, "Name", "Filter based on the operator name"},
+ {1, "KEY", 0, "Key-Binding", "Filter based on key bindings"},
+ {0, NULL, 0, NULL, NULL}};
+
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SpaceUserPreferences", "Space");
RNA_def_struct_sdna(srna, "SpaceUserPref");
RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data");
-
+
+ prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "filter_type");
+ RNA_def_property_enum_items(prop, filter_type_items);
+ RNA_def_property_ui_text(prop, "Filter Type", "Filter method");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL);
+
prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "filter");
RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");