From 240345842dd1594709433df1ff3448c55968254d Mon Sep 17 00:00:00 2001 From: Paul Golter Date: Thu, 14 Oct 2021 14:40:48 +0200 Subject: Filebrowser: Expose file select functions for File Browser to Python API. This patch adds activate_file_by_relative_path(relative_path="") and deselect_all() function to the space api of the File Browser. While the first sets the active file and adds it to the selection based on a relative path to the current File Browser directory the second one deselects all files but does not change the active file. Differential Revision: https://developer.blender.org/D12826 Reviewed by: Julian Eisel --- source/blender/editors/include/ED_fileselect.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 423d619f41a..3beabaf2d1d 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -151,6 +151,9 @@ void ED_fileselect_activate_by_id(struct SpaceFile *sfile, struct ID *asset_id, const bool deferred); +void ED_fileselect_deselect_all(struct SpaceFile *sfile); +void ED_fileselect_activate_by_relpath(struct SpaceFile *sfile, const char *relative_path); + void ED_fileselect_window_params_get(const struct wmWindow *win, int win_size[2], bool *is_maximized); -- cgit v1.2.3