Blender V5.0
FileListReadJob Struct Reference

Public Attributes

blender::Mutex lock
char main_filepath [FILE_MAX] = ""
Maincurrent_main = nullptr
FileListfilelist = nullptr
char cur_relbase [FILE_MAX_LIBEXTRA] = ""
asset_system::AssetLibraryload_asset_library = nullptr
bool only_main_data = false
bool reload_asset_library = false
FileListtmp_filelist = nullptr

Detailed Description

Definition at line 2077 of file filelist.cc.

Member Data Documentation

◆ cur_relbase

char FileListReadJob::cur_relbase[FILE_MAX_LIBEXTRA] = ""

The path currently being read, relative to the filelist root directory. Needed for recursive reading. The full file path is then composed like: <filelist root>/<cur_relbase>/<file name>. (whereby the file name may also be a library path within a .blend, e.g. Materials/Material.001).

Definition at line 2090 of file filelist.cc.

Referenced by current_relpath_append(), and filelist_readjob_recursive_dir_add_items().

◆ current_main

◆ filelist

◆ load_asset_library

asset_system::AssetLibrary* FileListReadJob::load_asset_library = nullptr

The current asset library to load. Usually the same as FileList.asset_library, however sometimes the FileList one is a combination of multiple other ones ("All" asset library), which need to be loaded individually. Then this can be set to override the FileList library. Use this in all loading code.

Definition at line 2096 of file filelist.cc.

Referenced by filelist_readjob_all_asset_library(), filelist_readjob_asset_library(), filelist_readjob_list_lib_add_datablock(), filelist_readjob_load_asset_library_data(), filelist_readjob_main_assets_add_items(), and filelist_readjob_recursive_dir_add_items().

◆ lock

blender::Mutex FileListReadJob::lock

◆ main_filepath

char FileListReadJob::main_filepath[FILE_MAX] = ""

◆ only_main_data

bool FileListReadJob::only_main_data = false

Set to request a partial read that only adds files representing Main data (IDs). Used when Main may have received changes of interest (e.g. asset removed or renamed).

Definition at line 2099 of file filelist.cc.

Referenced by filelist_readjob_all_asset_library(), filelist_readjob_asset_library(), filelist_readjob_is_partial_read(), and filelist_readjob_start_ex().

◆ reload_asset_library

bool FileListReadJob::reload_asset_library = false

Trigger a call to AS_asset_library_load() to update asset catalogs (won't reload the actual assets)

Definition at line 2102 of file filelist.cc.

Referenced by filelist_readjob_load_asset_library_data(), and filelist_readjob_start_ex().

◆ tmp_filelist

FileList* FileListReadJob::tmp_filelist = nullptr

Shallow copy of filelist for thread-safe access.

The job system calls filelist_readjob_update which moves any read file from tmp_filelist into filelist in a thread-safe way.

tmp_filelist also keeps an AssetLibrary * so that it can be loaded in the same thread, and moved to filelist once all categories are loaded.

NOTE: tmp_filelist is freed in filelist_readjob_free, so any copied pointers need to be set to nullptr to avoid double-freeing them.

Definition at line 2114 of file filelist.cc.

Referenced by filelist_readjob_all_asset_library(), filelist_readjob_append_entries(), filelist_readjob_asset_library(), filelist_readjob_do(), filelist_readjob_free(), filelist_readjob_load_asset_library_data(), filelist_readjob_main_assets(), filelist_readjob_main_assets_add_items(), filelist_readjob_recursive_dir_add_items(), filelist_readjob_startjob(), and filelist_readjob_update().


The documentation for this struct was generated from the following file: