Fix asset-view template ignoring "Asset Indexing" debug option

If the "Asset Indexing" option was disabled in Preferences > Experimental
> Debugging, the asset-view template (used by pose libraries for
example) would still use the indexing.
This commit is contained in:
Julian Eisel 2022-02-07 12:18:15 +01:00
parent d9b1bd01f7
commit b3bb51dd83
1 changed files with 3 additions and 1 deletions

View File

@ -41,6 +41,7 @@
#include "WM_api.h"
/* XXX uses private header of file-space. */
#include "../space_file/file_indexer.h"
#include "../space_file/filelist.h"
#include "ED_asset_handle.h"
@ -170,7 +171,8 @@ void AssetList::setup()
"",
"");
filelist_setindexer(files, &file_indexer_asset);
const bool use_asset_indexer = !USER_EXPERIMENTAL_TEST(&U, no_asset_indexing);
filelist_setindexer(files, use_asset_indexer ? &file_indexer_asset : &file_indexer_noop);
char path[FILE_MAXDIR] = "";
if (user_library) {