diff options
author | Thomas Beck <software@plasmasolutions.de> | 2015-08-23 13:40:21 +0300 |
---|---|---|
committer | Thomas Beck <software@plasmasolutions.de> | 2015-08-23 13:40:21 +0300 |
commit | 83e16a4a875850cce4aa67675388963267b29e0d (patch) | |
tree | cfe0607b58e35d933177c74a1046c922e6a8bc13 /source/blender/makesrna | |
parent | b88d8916e44f998c4f0bc397b29b0d6ff0f011e9 (diff) |
This commit makes it possible to select the sort mode whenever we invoke an operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).
Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)
Reviewers: mont29
Reviewed By: mont29
Subscribers: sebastian_k
Differential Revision: https://developer.blender.org/D1476
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 061133a9fcf..b1a631cc610 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -154,6 +154,8 @@ extern EnumPropertyItem viewport_shade_items[]; extern EnumPropertyItem navigation_mode_items[]; +extern EnumPropertyItem file_sort_items[]; + int rna_node_tree_type_to_enum(struct bNodeTreeType *typeinfo); int rna_node_tree_idname_to_enum(const char *idname); struct bNodeTreeType *rna_node_tree_type_from_enum(int value); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d7af1f6e5ac..cc92f7cd6a9 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -229,6 +229,14 @@ static EnumPropertyItem fileselectparams_recursion_level_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem file_sort_items[] = { + {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, + {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"}, + {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, + {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, + {0, NULL, 0, NULL, NULL} +}; + #ifdef RNA_RUNTIME #include "DNA_anim_types.h" @@ -3733,16 +3741,6 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem file_sort_items[] = { - {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", - "Sort the file list alphabetically"}, - {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", - "Sort the file list by extension"}, - {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, - {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, - {0, NULL, 0, NULL, NULL} - }; - static EnumPropertyItem thumbnail_size_items[] = { {32, "TINY", 0, "Tiny", ""}, {64, "SMALL", 0, "Small", ""}, |