diff options
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 8178e54e023..a1472a2c1b3 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -2624,7 +2624,8 @@ void file_filename_enter_handle(bContext *C, void *UNUSED(arg_unused), void *arg matches = file_select_match(sfile, params->file, matched_file); /* *After* file_select_match! */ - BLI_filename_make_safe(params->file); + const bool allow_tokens = (params->flag & FILE_PATH_TOKENS_ALLOW) != 0; + BLI_filename_make_safe_ex(params->file, allow_tokens); if (matches) { /* replace the pattern (or filename that the user typed in, diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index e3ac5840da3..03261d6f267 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -318,6 +318,10 @@ static FileSelectParams *fileselect_ensure_updated_file_params(SpaceFile *sfile) params->flag |= RNA_boolean_get(op->ptr, "active_collection") ? FILE_ACTIVE_COLLECTION : 0; } + if ((prop = RNA_struct_find_property(op->ptr, "allow_path_tokens"))) { + params->flag |= RNA_property_boolean_get(op->ptr, prop) ? FILE_PATH_TOKENS_ALLOW : 0; + } + if ((prop = RNA_struct_find_property(op->ptr, "display_type"))) { params->display = RNA_property_enum_get(op->ptr, prop); } |