Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Golter <paulgolter>2021-10-14 15:40:48 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-10-14 15:42:43 +0300
commit240345842dd1594709433df1ff3448c55968254d (patch)
treee16d86c3e2b1f43e1c2750cb9631b81f64aaa551 /source/blender/editors/include
parent9ca567bc4e99403c2574f823922933da5cbc20ec (diff)
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
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_fileselect.h3
1 files changed, 3 insertions, 0 deletions
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);