|
Blender V5.3
|
Classes | |
| class | AbstractFile |
| struct | ApiVersionInfo |
| struct | AssetIndex |
| class | AssetIndexFile |
| struct | AssetLibraryIndex |
| References the asset library directory. More... | |
| struct | AssetLibraryListingPageV1 |
| struct | AssetLibraryListingV1 |
| struct | AssetLibraryMeta |
| class | BlendFile |
| Reference to a blend file that can be indexed. More... | |
| class | FileStatusChecker |
| class | ReadingResult |
| struct | RemoteListingAssetEntry |
| struct | RemoteListingFileEntry |
Typedefs | |
| using | RemoteListingEntryProcessFn = FunctionRef<bool(RemoteListingAssetEntry &)> |
| using | RemoteListingWaitForPagesFn = FunctionRef<bool()> |
| using | Timestamp = std::filesystem::file_time_type |
Functions | |
| bool | read_remote_listing (StringRefNull root_dirpath, StringRefNull asset_library_name, ReportList &reports, RemoteListingEntryProcessFn process_fn, RemoteListingWaitForPagesFn wait_fn=nullptr, std::optional< Timestamp > ignore_before_timestamp=std::nullopt) |
| AssetMetaData * | asset_metadata_from_dictionary (const io::serialize::DictionaryValue &entry) |
| ReadingResult | read_remote_listing_v1 (StringRefNull listing_root_dirpath, RemoteListingEntryProcessFn process_fn, RemoteListingWaitForPagesFn wait_fn=nullptr, const std::optional< Timestamp > ignore_before_timestamp=std::nullopt) |
| constexpr StringRef | ATTRIBUTE_VERSION ("version") |
| Indexer for asset libraries. | |
| constexpr StringRef | ATTRIBUTE_ENTRIES ("entries") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_NAME ("name") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_CATALOG_ID ("catalog_id") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_CATALOG_NAME ("catalog_name") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_DESCRIPTION ("description") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_AUTHOR ("author") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_COPYRIGHT ("copyright") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_LICENSE ("license") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_TAGS ("tags") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_PROPERTIES ("properties") |
| constexpr StringRef | ATTRIBUTE_ENTRIES_PREFERRED_IMPORT_METHOD ("preferred_import_method") |
| static void | add_id_name (DictionaryValue &result, const short idcode, const StringRefNull name) |
| add id + name to the attributes. | |
| static void | init_value_from_file_indexer_entry (DictionaryValue &result, const FileIndexerEntry *indexer_entry) |
| static void | init_value_from_file_indexer_entries (DictionaryValue &result, const FileIndexerEntries &indexer_entries) |
| static void | init_indexer_entry_from_value (FileIndexerEntry &indexer_entry, const DictionaryValue &entry) |
| static int | init_indexer_entries_from_value (FileIndexerEntries &indexer_entries, const DictionaryValue &value) |
| static eFileIndexerResult | read_index (const char *filename, FileIndexerEntries *entries, int *r_read_entries_len, void *user_data) |
| static void | update_index (const char *filename, FileIndexerEntries *entries, void *user_data) |
| static void * | init_user_data (const char *root_directory, size_t root_directory_maxncpy) |
| static void | free_user_data (void *user_data) |
| static void | filelist_finished (void *user_data) |
| constexpr FileIndexerType | asset_indexer () |
| static ReadingResult< ApiVersionInfo > | choose_api_version (const AssetLibraryMeta &library_meta) |
General functions for reading. | |
| std::unique_ptr< io::serialize::Value > | read_contents (StringRefNull filepath) |
| std::optional< asset_system::URLWithHash > | parse_url_with_hash_dict (const DictionaryValue *url_with_hash_dict) |
Meta file | |
Containing info like the author and contact information (all of which is ignored here), as well as the API version. | |
| std::optional< bool > | file_older_than_timestamp (const char *filepath, Timestamp timestamp) |
Remote asset listing page | |
| static std::optional< int > | blender_version_from_string (const blender::StringRef str) |
| static ReadingResult< bool > | blender_version_matches (const DictionaryValue &asset_dictionary) |
| static ReadingResult< RemoteListingAssetEntry > | listing_entry_from_asset_dictionary (const DictionaryValue &dictionary, const Map< std::string, RemoteListingFileEntry > &file_path_to_entry_map) |
| static ReadingResult< RemoteListingFileEntry > | listing_file_from_asset_dictionary (const DictionaryValue &dictionary) |
| static ReadingResult | listing_entries_from_root (const StringRefNull listing_root_dirpath, const DictionaryValue &value, const RemoteListingEntryProcessFn process_fn) |
Variables | |
| const FileIndexerType | file_indexer_asset = asset_indexer() |
| constexpr const char * | hash_service_filename_prefix = "_file_hashes" |
| using blender::ed::asset::index::RemoteListingEntryProcessFn = FunctionRef<bool(RemoteListingAssetEntry &)> |
Definition at line 92 of file ED_asset_indexer.hh.
| using blender::ed::asset::index::RemoteListingWaitForPagesFn = FunctionRef<bool()> |
Definition at line 93 of file ED_asset_indexer.hh.
| using blender::ed::asset::index::Timestamp = std::filesystem::file_time_type |
Definition at line 96 of file ED_asset_indexer.hh.
|
static |
add id + name to the attributes.
NOTE: id and name are encoded like #ID.name
Definition at line 154 of file asset_indexer.cc.
References add_id_name(), ATTRIBUTE_ENTRIES_NAME(), and blender::result.
Referenced by add_id_name(), and init_value_from_file_indexer_entry().
|
constexpr |
Definition at line 804 of file asset_indexer.cc.
References asset_indexer(), filelist_finished(), blender::FileIndexerType::filelist_finished, free_user_data(), blender::FileIndexerType::free_user_data, init_user_data(), blender::FileIndexerType::init_user_data, read_index(), blender::FileIndexerType::read_index, update_index(), and blender::FileIndexerType::update_index.
Referenced by asset_indexer().
| AssetMetaData * blender::ed::asset::index::asset_metadata_from_dictionary | ( | const io::serialize::DictionaryValue & | entry | ) |
Definition at line 235 of file asset_indexer.cc.
References asset_metadata_from_dictionary(), blender::ASSETDATA_USE_OWN_IMPORT_METHOD, ATTRIBUTE_ENTRIES_AUTHOR(), ATTRIBUTE_ENTRIES_CATALOG_ID(), ATTRIBUTE_ENTRIES_CATALOG_NAME(), ATTRIBUTE_ENTRIES_COPYRIGHT(), ATTRIBUTE_ENTRIES_DESCRIPTION(), ATTRIBUTE_ENTRIES_LICENSE(), ATTRIBUTE_ENTRIES_PREFERRED_IMPORT_METHOD(), ATTRIBUTE_ENTRIES_PROPERTIES(), ATTRIBUTE_ENTRIES_TAGS(), blender::AssetMetaData::author, blender::BKE_asset_metadata_create(), blender::BKE_asset_metadata_tag_add(), blender::BLI_strdupn(), blender::AssetMetaData::catalog_id, blender::AssetMetaData::catalog_simple_name, blender::bke::idprop::convert_from_serialize_value(), blender::AssetMetaData::copyright, blender::bke::idprop::create_group(), blender::AssetMetaData::description, blender::AssetMetaData::flag, blender::IDP_AddToGroup(), blender::IDP_GROUP, blender::AssetMetaData::license, blender::io::serialize::DictionaryValue::lookup(), blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_str(), blender::IDProperty::next, blender::AssetMetaData::preferred_import_method, blender::AssetMetaData::properties, blender::rna_enum_asset_import_method_items, blender::RNA_enum_value_from_identifier(), STRNCPY_UTF8, and blender::IDProperty::type.
Referenced by asset_metadata_from_dictionary(), init_indexer_entry_from_value(), and listing_entry_from_asset_dictionary().
|
constexpr |
References ATTRIBUTE_ENTRIES().
Referenced by ATTRIBUTE_ENTRIES(), init_indexer_entries_from_value(), and init_value_from_file_indexer_entries().
|
constexpr |
References ATTRIBUTE_ENTRIES_AUTHOR().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_AUTHOR(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_CATALOG_ID().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_CATALOG_ID(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_CATALOG_NAME().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_CATALOG_NAME(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_COPYRIGHT().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_COPYRIGHT(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_DESCRIPTION().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_DESCRIPTION(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_LICENSE().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_LICENSE(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_NAME().
Referenced by add_id_name(), ATTRIBUTE_ENTRIES_NAME(), and init_indexer_entry_from_value().
|
constexpr |
|
constexpr |
References ATTRIBUTE_ENTRIES_PROPERTIES().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_PROPERTIES(), and init_value_from_file_indexer_entry().
|
constexpr |
References ATTRIBUTE_ENTRIES_TAGS().
Referenced by asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_TAGS(), and init_value_from_file_indexer_entry().
|
constexpr |
Indexer for asset libraries.
Indexes are stored per input file. Each index can contain zero to multiple asset entries. The indexes are grouped together per asset library. They are stored in BKE_appdir_folder_caches + /asset-library-indices/<asset-library-hash>/<asset-index-hash>_<asset_file>.index.json.
The structure of an index file is
NOTE: entries, author, description, copyright, license, tags and properties are optional attributes. If preferred_import_method is set, the ASSETDATA_USE_OWN_IMPORT_METHOD flag will be set on the asset metadata. Otherwise, it will not be set.
NOTE: File browser uses name and idcode separate. Inside the index they are joined together like #ID.name. NOTE: File browser group name isn't stored in the index as it is a translatable name.
References ATTRIBUTE_VERSION().
Referenced by blender::ed::asset::index::AssetIndex::AssetIndex(), ATTRIBUTE_VERSION(), and blender::ed::asset::index::AssetIndex::get_version().
|
static |
Parse the string as "major.minor" version, returning (major*100 + minor). This can then be compared to BLENDER_VERSION from BKE_blender_version.h.
Definition at line 55 of file asset_indexer_remote_listing_v1.cc.
References blender::blender::StringRefBase::begin(), blender_version_from_string(), dot(), blender::blender::StringRefBase::end(), blender::blender::StringRefBase::not_found, and str.
Referenced by blender_version_from_string(), and blender_version_matches().
|
static |
Definition at line 75 of file asset_indexer_remote_listing_v1.cc.
References BLENDER_VERSION, blender_version_from_string(), blender_version_matches(), blender::ed::asset::index::ReadingResult< T >::Failure, blender::io::serialize::DictionaryValue::lookup_dict(), blender::io::serialize::DictionaryValue::lookup_str(), N_, and blender::ed::asset::index::ReadingResult< T >::Success().
Referenced by blender_version_matches(), and listing_entry_from_asset_dictionary().
|
static |
Definition at line 219 of file asset_indexer_remote_listing.cc.
References blender::ed::asset::index::AssetLibraryMeta::api_versions, choose_api_version(), blender::ed::asset::index::ReadingResult< T >::Failure, N_, and blender::ed::asset::index::ReadingResult< T >::Success().
Referenced by choose_api_version(), and read_remote_listing().
| std::optional< bool > blender::ed::asset::index::file_older_than_timestamp | ( | const char * | filepath, |
| Timestamp | timestamp ) |
Note that this uses std::filesystem::file_time_type to get
TODO better report error message?
Definition at line 120 of file asset_indexer_remote_listing.cc.
References file_older_than_timestamp(), and blender::gpu::shader::metadata::printf.
Referenced by file_older_than_timestamp(), blender::ed::asset::index::AssetLibraryMeta::read(), and read_remote_listing_v1().
|
static |
Definition at line 795 of file asset_indexer.cc.
References CLOG_INFO, filelist_finished(), blender::LOG, and blender::ed::asset::index::AssetLibraryIndex::remove_unused_index_files().
Referenced by asset_indexer(), and filelist_finished().
|
static |
Definition at line 790 of file asset_indexer.cc.
References free_user_data().
Referenced by asset_indexer(), and free_user_data().
|
static |
Definition at line 318 of file asset_indexer.cc.
References ATTRIBUTE_ENTRIES(), blender::BLI_assert(), blender::BLI_linklist_prepend(), blender::element, blender::io::serialize::ArrayValue::elements(), blender::FileIndexerEntries::entries, init_indexer_entries_from_value(), init_indexer_entry_from_value(), and blender::io::serialize::DictionaryValue::lookup_array().
Referenced by blender::ed::asset::index::AssetIndex::extract_into(), and init_indexer_entries_from_value().
|
static |
Definition at line 305 of file asset_indexer.cc.
References blender::BLODataBlockInfo::asset_data, asset_metadata_from_dictionary(), ATTRIBUTE_ENTRIES_NAME(), blender::blender::StringRefBase::copy_utf8_truncated(), blender::blender::StringRefBase::data(), blender::FileIndexerEntry::datablock_info, blender::BLODataBlockInfo::free_asset_data, blender::GS(), blender::FileIndexerEntry::idcode, init_indexer_entry_from_value(), blender::io::serialize::DictionaryValue::lookup_str(), blender::BLODataBlockInfo::name, and blender::blender::StringRefBase::substr().
Referenced by init_indexer_entries_from_value(), and init_indexer_entry_from_value().
|
static |
Definition at line 781 of file asset_indexer.cc.
References blender::BLI_strnlen(), blender::ed::asset::index::AssetLibraryIndex::collect_preexisting_file_indices(), init_user_data(), blender::ed::asset::index::AssetLibraryIndex::remove_broken_index_files(), and blender::StringRef::StringRef().
Referenced by asset_indexer(), and init_user_data().
|
static |
Definition at line 211 of file asset_indexer.cc.
References blender::BLODataBlockInfo::asset_data, ATTRIBUTE_ENTRIES(), blender::FileIndexerEntry::datablock_info, blender::FileIndexerEntries::entries, init_value_from_file_indexer_entries(), init_value_from_file_indexer_entry(), blender::LinkNode::next, and blender::result.
Referenced by blender::ed::asset::index::AssetIndex::AssetIndex(), and init_value_from_file_indexer_entries().
|
static |
Definition at line 164 of file asset_indexer.cc.
References add_id_name(), blender::io::serialize::ArrayValue::append_str(), blender::BLODataBlockInfo::asset_data, blender::ASSETDATA_USE_OWN_IMPORT_METHOD, ATTRIBUTE_ENTRIES_AUTHOR(), ATTRIBUTE_ENTRIES_CATALOG_ID(), ATTRIBUTE_ENTRIES_CATALOG_NAME(), ATTRIBUTE_ENTRIES_COPYRIGHT(), ATTRIBUTE_ENTRIES_DESCRIPTION(), ATTRIBUTE_ENTRIES_LICENSE(), ATTRIBUTE_ENTRIES_PREFERRED_IMPORT_METHOD(), ATTRIBUTE_ENTRIES_PROPERTIES(), ATTRIBUTE_ENTRIES_TAGS(), blender::AssetMetaData::author, blender::AssetMetaData::catalog_id, blender::AssetMetaData::catalog_simple_name, blender::bke::idprop::convert_to_serialize_values(), blender::AssetMetaData::copyright, blender::FileIndexerEntry::datablock_info, blender::AssetMetaData::description, blender::AssetMetaData::flag, blender::FileIndexerEntry::idcode, init_value_from_file_indexer_entry(), blender::AssetMetaData::license, blender::AssetTag::name, blender::BLODataBlockInfo::name, blender::AssetMetaData::preferred_import_method, blender::AssetMetaData::properties, blender::result, blender::rna_enum_asset_import_method_items, blender::RNA_enum_identifier(), blender::UUID::str(), and blender::AssetMetaData::tags.
Referenced by init_value_from_file_indexer_entries(), and init_value_from_file_indexer_entry().
|
static |
Definition at line 264 of file asset_indexer_remote_listing_v1.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::asset_system::OnlineAssetInfo::asset_file(), blender::BLI_assert(), BLI_assert_msg, blender::ed::asset::index::ReadingResult< T >::Cancelled(), blender::io::serialize::ArrayValue::elements(), blender::ed::asset::index::ReadingResult< T >::Failure, blender::ed::asset::index::ReadingResult< T >::failure_reason, blender::ed::asset::index::ReadingResult< T >::is_cancelled(), blender::ed::asset::index::RemoteListingAssetEntry::is_empty(), blender::ed::asset::index::ReadingResult< T >::is_failure(), blender::ed::asset::index::ReadingResult< T >::is_success(), listing_entries_from_root(), listing_entry_from_asset_dictionary(), listing_file_from_asset_dictionary(), blender::ed::asset::index::RemoteListingFileEntry::local_path, blender::io::serialize::DictionaryValue::lookup_array(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), N_, blender::ed::asset::index::RemoteListingAssetEntry::online_info, blender::ed::asset::index::FileStatusChecker::remote_file_status(), blender::ed::asset::index::RemoteListingAssetEntry::remote_file_status, blender::result, blender::ed::asset::index::ReadingResult< T >::Success(), and blender::ed::asset::index::ReadingResult< T >::warnings.
Referenced by listing_entries_from_root(), and blender::ed::asset::index::AssetLibraryListingPageV1::read_asset_entries().
|
static |
Definition at line 116 of file asset_indexer_remote_listing_v1.cc.
References blender::io::serialize::Value::as_string_value(), blender::BLODataBlockInfo::asset_data, asset_metadata_from_dictionary(), blender::BKE_asset_metadata_create(), blender::BKE_idtype_idcode_from_name(), blender::BKE_idtype_name_normalize(), blender_version_matches(), blender::StringRefNull::c_str(), CLOG_DEBUG, blender::blender::StringRefBase::copy_utf8_truncated(), blender::ed::asset::index::RemoteListingAssetEntry::datablock_info, blender::ed::asset::index::ReadingResult< T >::Failure, blender::ed::asset::index::ReadingResult< T >::failure_reason, blender::asset_system::OnlineAssetInfo::files, blender::BLODataBlockInfo::free_asset_data, blender::ed::asset::index::RemoteListingAssetEntry::idcode, blender::ed::asset::index::ReadingResult< T >::is_success(), listing_entry_from_asset_dictionary(), blender::LOG, blender::io::serialize::DictionaryValue::lookup_array(), blender::io::serialize::DictionaryValue::lookup_dict(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::io::serialize::DictionaryValue::lookup_str(), N_, blender::BLODataBlockInfo::name, blender::ed::asset::index::RemoteListingAssetEntry::online_info, parse_url_with_hash_dict(), blender::asset_system::OnlineAssetInfo::preview_url, blender::ed::asset::index::ReadingResult< T >::Success(), and blender::io::serialize::StringValue::value().
Referenced by listing_entries_from_root(), and listing_entry_from_asset_dictionary().
|
static |
Definition at line 219 of file asset_indexer_remote_listing_v1.cc.
References blender::ed::asset::index::RemoteListingFileEntry::download_url, blender::ed::asset::index::ReadingResult< T >::Failure, blender::asset_system::URLWithHash::hash, blender::bke::idprop::hash(), listing_file_from_asset_dictionary(), blender::ed::asset::index::RemoteListingFileEntry::local_path, blender::io::serialize::DictionaryValue::lookup_int(), blender::io::serialize::DictionaryValue::lookup_str(), N_, blender::ed::asset::index::RemoteListingFileEntry::size_in_bytes, blender::ed::asset::index::ReadingResult< T >::Success(), and blender::asset_system::URLWithHash::url.
Referenced by listing_entries_from_root(), and listing_file_from_asset_dictionary().
| std::optional< asset_system::URLWithHash > blender::ed::asset::index::parse_url_with_hash_dict | ( | const io::serialize::DictionaryValue * | url_with_hash_dict | ) |
Parse a dictionary {url: "https://some.url/", hash: "sha256:abcd"} into a URLWithHash object.
If url_with_hash_dict is nullptr, or has no "url" field, std::nullopt is returned.
If the "hash" field is missing, it will simply be set to an empty string on the returned URLWithHash.
Definition at line 80 of file asset_indexer_remote_listing.cc.
References blender::bke::idprop::hash(), blender::io::serialize::DictionaryValue::lookup_str(), and parse_url_with_hash_dict().
Referenced by listing_entry_from_asset_dictionary(), parse_url_with_hash_dict(), blender::ed::asset::index::AssetLibraryListingV1::read(), and blender::ed::asset::index::AssetLibraryMeta::read().
| std::unique_ptr< Value > blender::ed::asset::index::read_contents | ( | StringRefNull | filepath | ) |
Definition at line 70 of file asset_indexer_remote_listing.cc.
References BLI_SCOPED_DEFER, blender::StringRefNull::c_str(), blender::io::serialize::JsonFormatter::deserialize(), and read_contents().
Referenced by blender::ed::asset::index::AssetLibraryListingV1::read(), blender::ed::asset::index::AssetLibraryMeta::read(), blender::ed::asset::index::AssetLibraryListingPageV1::read_asset_entries(), and read_contents().
|
static |
Definition at line 707 of file asset_indexer.cc.
References CLOG_DEBUG, CLOG_INFO, blender::ed::asset::index::AssetIndexFile::constains_entries(), blender::ed::asset::index::AssetIndex::CURRENT_VERSION, blender::ed::asset::index::AbstractFile::exists(), blender::FILE_INDEXER_ENTRIES_LOADED, blender::FILE_INDEXER_NEEDS_UPDATE, blender::ed::asset::index::AssetIndexFile::filename, blender::gpu::shader::parser::filename(), blender::ed::asset::index::AssetIndexFile::is_older_than(), blender::LOG, blender::ed::asset::index::AssetIndexFile::mark_as_used(), blender::ed::asset::index::AssetIndexFile::read_contents(), and read_index().
Referenced by asset_indexer(), and read_index().
| bool blender::ed::asset::index::read_remote_listing | ( | StringRefNull | root_dirpath, |
| StringRefNull | asset_library_name, | ||
| ReportList & | reports, | ||
| RemoteListingEntryProcessFn | process_fn, | ||
| RemoteListingWaitForPagesFn | wait_fn = nullptr, | ||
| std::optional< Timestamp > | ignore_before_timestamp = std::nullopt ) |
| process_fn | Called for each asset entry read from the listing. It's fine to move out the passed RemoteListingAssetEntry. Returning false will cancel the whole reading process and not read any further entries. |
| wait_fn | If this is set, reading will keep retrying to load unavailable pages, and call this wait function for each try. The wait function can block until it thinks new pages might be available. If this returns false the whole reading process will be cancelled. |
Definition at line 240 of file asset_indexer_remote_listing.cc.
References blender::BKE_reportf(), BLI_assert_unreachable, blender::StringRefNull::c_str(), choose_api_version(), blender::ed::asset::index::ReadingResult< T >::Failure, blender::ed::asset::index::ReadingResult< T >::is_success(), N_, blender::ed::asset::index::AssetLibraryMeta::read(), read_remote_listing(), read_remote_listing_v1(), blender::result, RPT_, blender::RPT_ERROR, blender::RPT_WARNING, and blender::ed::asset::index::ReadingResult< T >::without_success_value().
Referenced by blender::filelist_readjob_remote_asset_library_index_read(), and read_remote_listing().
| ReadingResult blender::ed::asset::index::read_remote_listing_v1 | ( | StringRefNull | listing_root_dirpath, |
| RemoteListingEntryProcessFn | process_fn, | ||
| RemoteListingWaitForPagesFn | wait_fn = nullptr, | ||
| const std::optional< Timestamp > | ignore_before_timestamp = std::nullopt ) |
Reading of API schema version 1. See read_remote_listing() on process_fn.
| listing_root_dirpath | Absolute path to the remote listing root directory. |
Definition at line 431 of file asset_indexer_remote_listing_v1.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::BLI_assert(), blender::BLI_exists(), BLI_path_join, blender::StringRefNull::c_str(), blender::ed::asset::index::ReadingResult< T >::Cancelled(), CLOG_DEBUG, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::ed::asset::index::ReadingResult< T >::Failure, blender::ed::asset::index::ReadingResult< T >::failure_reason, FILE_MAX, file_older_than_timestamp(), blender::ed::asset::index::ReadingResult< T >::has_warnings(), blender::ed::asset::index::ReadingResult< T >::is_cancelled(), blender::ed::asset::index::ReadingResult< T >::is_failure(), blender::ed::asset::index::ReadingResult< T >::is_success(), blender::LOG, N_, blender::gpu::shader::metadata::printf, blender::ed::asset::index::AssetLibraryListingV1::read(), blender::ed::asset::index::AssetLibraryListingPageV1::read_asset_entries(), read_remote_listing_v1(), blender::result, blender::SEP, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::ed::asset::index::ReadingResult< T >::Success(), and blender::ed::asset::index::ReadingResult< T >::warnings.
Referenced by read_remote_listing(), and read_remote_listing_v1().
|
static |
Definition at line 767 of file asset_indexer.cc.
References CLOG_INFO, blender::gpu::shader::parser::filename(), blender::ed::asset::index::AssetIndexFile::get_file_path(), blender::ed::asset::index::BlendFile::get_file_path(), blender::LOG, update_index(), and blender::ed::asset::index::AssetIndexFile::write_contents().
Referenced by asset_indexer(), and update_index().
| const FileIndexerType blender::ed::asset::index::file_indexer_asset = asset_indexer() |
File Indexer Service for indexing asset files.
Opening and parsing a large collection of asset files inside a library can take a lot of time. To reduce the time it takes the files are indexed.
Definition at line 815 of file asset_indexer.cc.
Referenced by blender::ed::asset::list::AssetList::setup().
|
constexpr |
Filename prefix for the Disk File Hash Service used by FileStatusChecker.
The Disk File Hash Service itself will complete the filename depending on the back-end used. At the moment of writing that's SQLite, which will append _v{schema version}.sqlite.
NOTE: if this changes, also update the RemoteAssetListingLocator class in listing_downloader.py.
Definition at line 33 of file asset_indexer_remote_file_status.cc.
Referenced by blender::ed::asset::index::FileStatusChecker::FileStatusChecker().