diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-24 11:05:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-24 11:05:43 +0400 |
commit | 6a4b9298c80d0f27637f88cca0ad9f05040608d3 (patch) | |
tree | b53d155d0339d16b743ae1ed483786ab79393788 /source/blender/makesrna/intern/rna_space.c | |
parent | 99643037caef3539fdac807b22431bd6cc5deba7 (diff) |
patch [#23968] filter_filetypes property to allow operators to filter by file extensions in the file selector
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2a59e668e15..eeb45aec538 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2126,6 +2126,11 @@ static void rna_def_fileselect_params(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Filter Folder", "Show folders"); RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL); + + prop= RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "filter_glob"); + RNA_def_property_ui_text(prop, "Extension Filter", ""); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL); } @@ -2141,6 +2146,10 @@ static void rna_def_space_filebrowser(BlenderRNA *brna) prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "params"); RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser"); + + prop= RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "op"); + RNA_def_property_ui_text(prop, "Operator", ""); } static void rna_def_space_info(BlenderRNA *brna) |