diff options
author | Julian Eisel <julian@blender.org> | 2022-01-19 22:02:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-19 22:12:53 +0300 |
commit | 293aab225339548dc25dc95d23276af38254f33a (patch) | |
tree | f339f347a862b775714a803de0ff6aece7764a88 /source/blender/editors | |
parent | 9a2d1cd5b7914ef41c24484986085a85ca83ebec (diff) |
Asset Browser: Add debug option to disable asset indexing
Adds an "Asset Indexing" option (enabled by default) to Preferences >
Experimental > Debugging. This is useful when working on the asset
library loading.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index ea336d0b65c..97a5f173ffd 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -57,6 +57,7 @@ #include "UI_view2d.h" #include "GPU_framebuffer.h" +#include "file_indexer.h" #include "file_intern.h" /* own include */ #include "filelist.h" #include "fsmenu.h" @@ -356,7 +357,9 @@ static void file_refresh(const bContext *C, ScrArea *area) } if (ED_fileselect_is_asset_browser(sfile)) { - filelist_setindexer(sfile->files, &file_indexer_asset); + const bool use_asset_indexer = !USER_EXPERIMENTAL_TEST(&U, no_asset_indexing); + filelist_setindexer(sfile->files, + use_asset_indexer ? &file_indexer_asset : &file_indexer_noop); } /* Update the active indices of bookmarks & co. */ |