diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-10-16 13:04:56 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-10-16 15:06:48 +0300 |
commit | b54626364253f6023b2a2fa9d7a4211ea45a3bd4 (patch) | |
tree | 2b62dc6fb29ba82b0cd4af75229b2378b88eaadb /source/blender/editors/space_file | |
parent | a3f7ae1b968232ddc4fc4a8be02ba25a2fcf04eb (diff) |
UI: Remember ID-Filter in-between File Browser calls
This adds the ID-Filters visible on append/link to the settings the file
browser remembers, potentially storing them in the Preferences.
Artists in the studio here requested this. They typically have to set up
the same or similar settings every time, so this saves them from that.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index ba4ccb4fba9..bb3906a961b 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -103,10 +103,9 @@ short ED_fileselect_set_params(SpaceFile *sfile) sizeof(sfile->params->dir), sizeof(sfile->params->file)); sfile->params->filter_glob[0] = '\0'; - /* set the default thumbnails size */ sfile->params->thumbnail_size = U_default.file_space_data.thumbnail_size; - /* Show size column by default. */ sfile->params->details_flags = U_default.file_space_data.details_flags; + sfile->params->filter_id = U_default.file_space_data.filter_id; } params = sfile->params; @@ -246,9 +245,6 @@ short ED_fileselect_set_params(SpaceFile *sfile) } } - /* For now, always init filterid to 'all true' */ - params->filter_id = FILTER_ID_ALL; - if (U.uiflag & USER_HIDE_DOT) { params->flag |= FILE_HIDE_DOT; } @@ -348,6 +344,7 @@ void ED_fileselect_set_params_from_userdef(SpaceFile *sfile) } sfile->params->thumbnail_size = sfile_udata->thumbnail_size; sfile->params->details_flags = sfile_udata->details_flags; + sfile->params->filter_id = sfile_udata->filter_id; /* Combine flags we take from params with the flags we take from userdef. */ sfile->params->flag = (sfile->params->flag & ~PARAMS_FLAGS_REMEMBERED) | @@ -371,6 +368,7 @@ void ED_fileselect_params_to_userdef(SpaceFile *sfile, int temp_win_size[2]) sfile_udata_new->sort_type = sfile->params->sort; sfile_udata_new->details_flags = sfile->params->details_flags; sfile_udata_new->flag = sfile->params->flag & PARAMS_FLAGS_REMEMBERED; + sfile_udata_new->filter_id = sfile->params->filter_id; if (temp_win_size) { sfile_udata_new->temp_win_sizex = temp_win_size[0]; |