Blender
V3.3
|
References the asset library directory. More...
Public Member Functions | |
AssetLibraryIndex (const StringRef library_path) | |
uint64_t | hash () const |
StringRefNull | get_library_file_path () const |
void | init_indices_base_path () |
Initializes #AssetLibraryIndex.indices_base_path. More... | |
std::string | index_file_path (const BlendFile &asset_file) const |
void | init_unused_index_files () |
void | mark_as_used (const std::string &filename) |
int | remove_unused_index_files () const |
Public Attributes | |
Set< std::string > | unused_file_indices |
std::string | indices_base_path |
Absolute path where the indices of library are stored. More... | |
std::string | library_path |
References the asset library directory.
The AssetLibraryIndex instance is used to keep track of unused file indices. When reading any used indices are removed from the list and when reading is finished the unused indices are removed.
Definition at line 419 of file asset_indexer.cc.
|
inline |
Definition at line 437 of file asset_indexer.cc.
|
inline |
Definition at line 448 of file asset_indexer.cc.
|
inline |
Definition at line 442 of file asset_indexer.cc.
|
inline |
asset_file
.{indices_base_path}/{asset-file_hash}_{asset-file-filename}.index.json
.
Definition at line 477 of file asset_indexer.cc.
References blender::ed::asset::index::BlendFile::get_filename(), blender::ed::asset::index::BlendFile::hash(), and hex.
|
inline |
Initializes #AssetLibraryIndex.indices_base_path.
BKE_appdir_folder_caches/asset-library-indices/<asset-library-name-hash>/
Definition at line 458 of file asset_indexer.cc.
References BKE_appdir_folder_caches(), BLI_path_append(), FILE_MAX, hash, and hex.
|
inline |
Initialize to keep track of unused file indices.
Definition at line 489 of file asset_indexer.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_is_dir(), BLI_str_endswith(), direntry::path, and direntry::relname.
Referenced by blender::ed::asset::index::init_user_data().
|
inline |
Definition at line 507 of file asset_indexer.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by blender::ed::asset::index::AssetIndexFile::mark_as_used().
|
inline |
Definition at line 512 of file asset_indexer.cc.
References BLI_delete(), CLOG_INFO, and LOG.
Referenced by blender::ed::asset::index::filelist_finished().
std::string blender::ed::asset::index::AssetLibraryIndex::indices_base_path |
Absolute path where the indices of library
are stored.
\NOTE: includes trailing directory separator.
Definition at line 432 of file asset_indexer.cc.
std::string blender::ed::asset::index::AssetLibraryIndex::library_path |
Definition at line 434 of file asset_indexer.cc.
Set<std::string> blender::ed::asset::index::AssetLibraryIndex::unused_file_indices |
Tracks indices that haven't been used yet.
Contains absolute paths to the indices.
Definition at line 425 of file asset_indexer.cc.