|
Blender V5.3
|
Namespaces | |
| namespace | tests |
| namespace | utils |
Classes | |
| class | AllAssetLibrary |
| class | AssetCatalog |
| class | AssetCatalogCollection |
| class | AssetCatalogDefinitionFile |
| class | AssetCatalogFilter |
| struct | AssetCatalogLessThan |
| class | AssetCatalogPath |
| class | AssetCatalogService |
| class | AssetCatalogTree |
| class | AssetCatalogTreeItem |
| class | AssetLibrary |
| class | AssetLibraryService |
| class | AssetRepresentation |
| class | DiskFileHashService |
| class | EssentialsAssetLibrary |
| struct | FileProgress |
| class | OnDiskAssetLibrary |
| struct | OnlineAssetFile |
| struct | OnlineAssetInfo |
| class | OnlineEssentialsLibrary |
| class | PreferencesOnDiskAssetLibrary |
| class | PreferencesRemoteAssetLibrary |
| struct | ProgressData |
| struct | ProgressTracker |
| class | RemoteAssetLibrary |
| struct | RemoteLibraryDefinitionRef |
| class | RemoteLibraryLoadingStatus |
| struct | RequestIdentifier |
| class | RuntimeAssetLibrary |
| struct | URLWithHash |
| class | UserAssetLibraryWrapper |
Typedefs | |
| using | CatalogID = UUID |
| using | CatalogPathComponent = std::string |
| using | CatalogFilePath = std::string |
| using | OwningAssetCatalogMap = Map<CatalogID, std::unique_ptr<AssetCatalog>> |
| using | AssetCatalogOrderedSet = std::set<const AssetCatalog *, AssetCatalogLessThan> |
| using | MutableAssetCatalogOrderedSet = std::set<AssetCatalog *, AssetCatalogLessThan> |
Enumerations | |
| enum class | RemoteAssetFileStatus { UNSET = 0 , NOT_ON_DISK = 1 , MATCH = 2 , NO_MATCH = 3 } |
Variables | |
| constexpr StringRefNull | REMOTE_LIBRARY_TOP_META_FILE_NAME = "_asset-library-meta.json" |
| constexpr StringRefNull | REMOTE_LIBRARY_TOP_META_FILE_NAME_LEADING_SLASH |
| static CLG_LogRef | LOG = {"asset.library.essentials"} |
Progress Tracking | |
| enum class | DownloadOutcome { Succeeded , Failed } |
| float | remote_library_total_asset_downloads_progress () |
| bool | remote_library_has_unfinished_asset_downloads () |
Remote Library Loading Status | |
| using | UrlToLibraryStatusMap = Map<std::string , asset_system::RemoteLibraryLoadingStatus> |
| static UrlToLibraryStatusMap & | library_to_status_map () |
| static void | ping_asset_file_done_impl (const bContext &C, const StringRef library_url, const StringRef absolute_file_url, const StringRef local_file_abspath, const DownloadOutcome outcome) |
Cache Paths | |
| const int8_t | REMOTE_LIBRARY_DIRNAME_LEN = 16 |
| std::string | remote_library_cache_directory_path (StringRefNull library_dirname) |
| std::string | remote_library_cache_directory_path_from_url (StringRef remote_url) |
| std::string | remote_library_asset_preview_path (const AssetRepresentation &asset) |
| using blender::asset_system::AssetCatalogOrderedSet = std::set<const AssetCatalog *, AssetCatalogLessThan> |
Set that stores catalogs ordered by (path, UUID). Being a set, duplicates are removed. The catalog's simple name is ignored in this.
Definition at line 385 of file AS_asset_catalog.hh.
| using blender::asset_system::CatalogFilePath = std::string |
Definition at line 36 of file AS_asset_catalog.hh.
| using blender::asset_system::CatalogID = UUID |
Definition at line 32 of file AS_asset_catalog.hh.
| using blender::asset_system::CatalogPathComponent = std::string |
Definition at line 33 of file AS_asset_catalog.hh.
| using blender::asset_system::MutableAssetCatalogOrderedSet = std::set<AssetCatalog *, AssetCatalogLessThan> |
Definition at line 386 of file AS_asset_catalog.hh.
| using blender::asset_system::OwningAssetCatalogMap = Map<CatalogID, std::unique_ptr<AssetCatalog>> |
Definition at line 37 of file AS_asset_catalog.hh.
| using blender::asset_system::UrlToLibraryStatusMap = Map<std::string , asset_system::RemoteLibraryLoadingStatus> |
Definition at line 410 of file remote_library.cc.
|
strong |
| Enumerator | |
|---|---|
| Succeeded | |
| Failed | |
Definition at line 268 of file remote_library.cc.
|
strong |
Status of the asset's file(s) on disk, compared to the remote asset listing.
Definition at line 16 of file AS_asset_file_status.hh.
| AssetLibraryReference blender::asset_system::all_library_reference | ( | ) |
Definition at line 529 of file asset_library.cc.
References all_library_reference(), blender::ASSET_LIBRARY_ALL, blender::AssetLibraryReference::custom_library_index, and blender::AssetLibraryReference::type.
Referenced by blender::ed::object::add_essential_asset_modifier(), all_library_reference(), blender::all_loading_finished(), blender::ed::object::all_loading_finished(), blender::ed::space_node::all_loading_finished(), blender::ed::vse::all_loading_finished(), blender::ed::sculpt_paint::brush_asset_activate_exec(), blender::build_catalog_tree(), blender::ed::object::build_catalog_tree(), blender::ed::space_node::build_catalog_tree(), blender::ed::vse::build_catalog_tree(), blender::ed::asset::list::clear(), blender::ed::asset::list::clear_all_library(), blender::ed::asset::shelf::create_shelf_from_type(), blender::ed::asset::shelf::ensure_asset_library_fetched(), blender::ed::asset::find_asset_from_weak_ref(), blender::ed::space_node::gather_search_link_ops_for_all_assets(), blender::ed::geometry::get_node_tools_type_data(), blender::asset_system::AllAssetLibrary::library_reference(), blender::ed::asset::refresh_asset_library(), blender::ed::geometry::register_node_group_operators(), blender::root_catalogs_draw(), blender::ed::asset::shelf::settings_ensure_valid_library_ref(), blender::ed::object::shade_auto_smooth_exec(), and blender::ed::object::ui_template_modifier_asset_menu_items().
| void blender::asset_system::all_library_reload_catalogs_if_dirty | ( | ) |
Definition at line 567 of file asset_library.cc.
References all_library_reload_catalogs_if_dirty(), blender::asset_system::AssetLibraryService::get(), and blender::asset_system::AssetLibraryService::reload_all_library_catalogs_if_dirty().
Referenced by all_library_reload_catalogs_if_dirty(), blender::build_catalog_tree(), blender::ed::object::build_catalog_tree(), blender::ed::space_node::build_catalog_tree(), blender::ed::vse::build_catalog_tree(), and blender::filelist_readjob_all_asset_library().
| void blender::asset_system::all_library_tag_catalogs_dirty | ( | ) |
Definition at line 561 of file asset_library.cc.
References all_library_tag_catalogs_dirty(), blender::asset_system::AssetLibraryService::get(), and blender::asset_system::AssetLibraryService::tag_all_library_catalogs_dirty().
Referenced by all_library_tag_catalogs_dirty(), and blender::filelist_readjob_all_asset_library().
| Vector< AssetLibraryReference > blender::asset_system::all_valid_asset_library_refs | ( | ) |
Get all asset library references which are enabled and for which the directory exists.
Definition at line 493 of file asset_library.cc.
References all_valid_asset_library_refs(), blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, blender::BKE_preferences_asset_library_is_valid(), blender::AssetLibraryReference::custom_library_index, blender::result, blender::AssetLibraryReference::type, blender::U, blender::USER_ASSETS_USE_ONLINE_ESSENTIALS, and USER_EXPERIMENTAL_TEST.
Referenced by all_valid_asset_library_refs(), and blender::asset_system::AssetLibraryService::get_asset_library_all().
|
static |
Definition at line 299 of file asset_system/intern/asset_catalog.cc.
References asset_definition_default_file_path_from_dir(), BLI_path_join, blender::blender::StringRefBase::data(), blender::asset_system::AssetCatalogService::DEFAULT_CATALOG_FILENAME, and PATH_MAX.
Referenced by asset_definition_default_file_path_from_dir(), blender::asset_system::AssetCatalogService::find_suitable_cdf_path_for_writing(), and blender::asset_system::AssetCatalogService::load_directory_recursive().
| bool blender::asset_system::contains_assets_from_remote_url | ( | const AssetLibrary & | library, |
| StringRef | remote_url ) |
Definition at line 599 of file asset_library.cc.
References blender::ASSET_LIBRARY_ALL, blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, contains_assets_from_remote_url(), blender::asset_system::AssetLibrary::foreach_loaded(), is_online_essentials_url(), and blender::asset_system::AssetLibrary::remote_url().
Referenced by contains_assets_from_remote_url(), and blender::filelist_remote_asset_library_refresh_online_assets_status().
|
static |
Definition at line 36 of file asset_catalog_collection.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), copy_catalog_map_into_existing(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by blender::asset_system::AssetCatalogCollection::add_catalogs_from_existing(), blender::asset_system::AssetCatalogCollection::copy_catalog_map(), and copy_catalog_map_into_existing().
| AssetLibraryReference blender::asset_system::current_file_library_reference | ( | ) |
Definition at line 545 of file asset_library.cc.
References blender::ASSET_LIBRARY_LOCAL, current_file_library_reference(), blender::AssetLibraryReference::custom_library_index, and blender::AssetLibraryReference::type.
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), current_file_library_reference(), blender::filelist_readjob_asset_library(), and blender::ed::asset::list::on_save_post().
| std::unique_ptr< DiskFileHashService > blender::asset_system::disk_file_hash_service_get | ( | StringRef | storage_path | ) |
Obtain a DiskFileHashService, which stores its cache at the given location.
Definition at line 25 of file disk_file_hash_service.cc.
References disk_file_hash_service_get().
Referenced by disk_file_hash_service_get(), and blender::ed::asset::index::FileStatusChecker::FileStatusChecker().
| StringRefNull blender::asset_system::essentials_directory_path | ( | ) |
Definition at line 117 of file essentials_library.cc.
References blender::BKE_appdir_folder_id(), blender::BLENDER_SYSTEM_DATAFILES, and essentials_directory_path().
Referenced by blender::BKE_packedfile_pack_all_libraries(), essentials_directory_path(), blender::filelist_readjob_essentials_asset_library(), blender::fileselect_refresh_asset_params(), blender::asset_system::AssetLibraryService::get_asset_library(), blender::asset_system::AssetLibraryService::resolve_asset_weak_reference_to_library_path(), blender::asset_system::AssetLibraryService::root_path_from_library_ref(), and blender::ui::tooltip_data_from_button_or_extra_icon().
| AssetLibraryReference blender::asset_system::essentials_library_reference | ( | ) |
Definition at line 537 of file asset_library.cc.
References blender::ASSET_LIBRARY_ESSENTIALS, blender::AssetLibraryReference::custom_library_index, essentials_library_reference(), and blender::AssetLibraryReference::type.
Referenced by essentials_library_reference().
| void blender::asset_system::foreach_registered_user_remote_library | ( | FunctionRef< void(bUserAssetLibrary &)> | fn | ) |
Iterates all libraries registered in the Preferences and calls the given function with the URL of the library.
Definition at line 1115 of file remote_library.cc.
References blender::ASSET_LIBRARY_USE_REMOTE_URL, foreach_registered_user_remote_library(), and blender::U.
Referenced by blender::filelist_start_job_all_asset_library(), and foreach_registered_user_remote_library().
| bool blender::asset_system::is_online_essentials_dirpath | ( | StringRef | dirpath | ) |
Check if the given absolute directory path is the online essentials cache path. If the path ends in a trailing slash, that's stripped before comparing.
Definition at line 174 of file essentials_library.cc.
References blender::BLI_assert(), blender::StringRef::drop_known_suffix(), blender::blender::StringRefBase::endswith(), blender::blender::StringRefBase::is_empty(), is_online_essentials_dirpath(), online_essentials_cache_directory_path(), and SEP_STR.
Referenced by is_online_essentials_dirpath(), and remote_library_request_download().
| bool blender::asset_system::is_online_essentials_url | ( | StringRef | url | ) |
Check if the given URL matches the online essentials URL, with or without the optional _asset-library-meta.json ending. If the .json file name ending isn't present, the trailing slash is necessary for the URLs to match.
Definition at line 159 of file essentials_library.cc.
References blender::blender::StringRefBase::back(), blender::BLI_assert(), blender::StringRef::drop_suffix(), blender::blender::StringRefBase::is_empty(), is_online_essentials_url(), REMOTE_LIBRARY_TOP_META_FILE_NAME, remote_library_url_ends_with_top_meta_file_name(), blender::blender::StringRefBase::size(), and blender::asset_system::OnlineEssentialsLibrary::URL.
Referenced by blender::BKE_preferences_remote_asset_library_url_set(), contains_assets_from_remote_url(), blender::asset_system::AssetLibraryService::get_asset_library(), is_online_essentials_url(), remote_library_request_download(), and blender::asset_system::tests::TEST().
| bool blender::asset_system::is_or_contains_remote_libraries | ( | const AssetLibraryReference & | reference | ) |
Return whether this is a remote asset library, or contains remote assets.
The All and Essentials libraries can have a mixture of local & remote assets.
Definition at line 573 of file asset_library.cc.
References blender::ASSET_LIBRARY_ALL, blender::ASSET_LIBRARY_CUSTOM, blender::ASSET_LIBRARY_ESSENTIALS, blender::ASSET_LIBRARY_LOCAL, blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, blender::ASSET_LIBRARY_USE_REMOTE_URL, blender::asset_system::AssetLibraryService::find_custom_asset_library_from_library_ref(), is_or_contains_remote_libraries(), and blender::AssetLibraryReference::type.
Referenced by blender::ed::asset::asset_library_reload_listing_exec(), blender::ed::asset::asset_library_reload_listing_poll(), blender::file_banner_remote_asset_libraries_poll(), blender::file_main_region_message_subscribe(), blender::filelist_set_asset_include_online(), is_or_contains_remote_libraries(), blender::ed::asset::shelf::region_message_subscribe(), and blender::ui::template_running_jobs().
|
static |
Definition at line 412 of file remote_library.cc.
References BLI_assert_msg, blender::BLI_thread_is_main(), and library_to_status_map().
Referenced by blender::asset_system::RemoteLibraryLoadingStatus::begin_loading(), blender::asset_system::RemoteLibraryLoadingStatus::failure_message(), blender::asset_system::RemoteLibraryLoadingStatus::handle_timeout(), blender::asset_system::RemoteLibraryLoadingStatus::last_new_pages_time(), library_to_status_map(), blender::asset_system::RemoteLibraryLoadingStatus::loading_start_time(), blender::asset_system::RemoteLibraryLoadingStatus::metafiles_in_place(), blender::asset_system::RemoteLibraryLoadingStatus::ping_metafiles_in_place(), blender::asset_system::RemoteLibraryLoadingStatus::ping_new_pages(), blender::asset_system::RemoteLibraryLoadingStatus::ping_still_loading(), remote_library_cancel_all_listing_downloads(), blender::asset_system::RemoteLibraryLoadingStatus::set_cancelled(), blender::asset_system::RemoteLibraryLoadingStatus::set_failure(), blender::asset_system::RemoteLibraryLoadingStatus::set_finished(), and blender::asset_system::RemoteLibraryLoadingStatus::status().
|
static |
Definition at line 648 of file asset_library_service.cc.
References blender::asset_system::AssetLibraryService::destroy(), and on_blendfile_load().
Referenced by blender::asset_system::AssetLibraryService::app_handler_register(), and on_blendfile_load().
| StringRefNull blender::asset_system::online_essentials_cache_directory_path | ( | ) |
Definition at line 146 of file essentials_library.cc.
References online_essentials_cache_directory_path(), and remote_library_cache_directory_path().
Referenced by blender::bke::asset_edit_weak_reference_from_id(), blender::bke::asset_weak_reference_for_essentials(), blender::bke::asset_weak_reference_for_online_essentials(), blender::BKE_preferences_remote_asset_library_url_set(), blender::filelist_readjob_essentials_asset_library(), blender::filelist_start_job_all_asset_library(), blender::filelist_start_job_essentials_asset_library(), blender::fileselect_refresh_asset_params(), blender::asset_system::EssentialsAssetLibrary::force_remote_listing_download(), is_online_essentials_dirpath(), online_essentials_cache_directory_path(), blender::asset_system::OnlineEssentialsLibrary::OnlineEssentialsLibrary(), blender::asset_system::AssetLibraryService::resolve_asset_weak_reference_to_library_path(), and blender::asset_system::AssetLibraryService::root_path_from_library_ref().
| AssetLibraryReference blender::asset_system::online_essentials_library_reference | ( | ) |
Definition at line 553 of file asset_library.cc.
References blender::ASSET_LIBRARY_ONLINE_ESSENTIALS, blender::AssetLibraryReference::custom_library_index, online_essentials_library_reference(), and blender::AssetLibraryReference::type.
Referenced by blender::filelist_readjob_essentials_asset_library(), and online_essentials_library_reference().
| StringRefNull blender::asset_system::online_essentials_url | ( | ) |
Definition at line 154 of file essentials_library.cc.
References online_essentials_url(), and blender::asset_system::OnlineEssentialsLibrary::URL.
Referenced by blender::filelist_start_job_all_asset_library(), blender::filelist_start_job_essentials_asset_library(), blender::asset_system::EssentialsAssetLibrary::force_remote_listing_download(), online_essentials_url(), and remote_library_cache_directory_path_from_url().
| std::ostream & blender::asset_system::operator<< | ( | std::ostream & | stream, |
| const AssetCatalogPath & | path_to_append ) |
Output the path as string.
Definition at line 96 of file asset_catalog_path.cc.
Referenced by blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), blender::operator<<(), and blender::operator<<().
|
static |
Definition at line 476 of file remote_library.cc.
References C, blender::CTX_wm_manager(), blender::CTX_wm_window(), blender::asset_system::ProgressTracker::file_finished(), blender::ed::asset::list::on_remote_assets_downloaded(), ping_asset_file_done_impl(), and blender::WM_event_add_mousemove().
Referenced by ping_asset_file_done_impl(), blender::asset_system::RemoteLibraryLoadingStatus::ping_asset_file_download_failed(), and blender::asset_system::RemoteLibraryLoadingStatus::ping_asset_file_download_succeeded().
| std::string blender::asset_system::remote_library_asset_preview_path | ( | const AssetRepresentation & | asset | ) |
Get the absolute file path the preview for asset is expected at once downloaded.
The path is built like this:
The reason hashes are used within _thumbs/large/ instead of the relative path of the asset (or another relative path derived from the preview URL) is to keep paths short enough to not violate path length limitations.
Definition at line 1048 of file remote_library.cc.
References BLI_assert_unreachable, blender::BLI_hash_md5_buffer(), blender::BLI_hash_md5_to_hexdigest(), blender::BLI_path_extension_or_end(), BLI_path_join, blender::StringRefNull::c_str(), FILE_MAX, FILE_MAXDIR, blender::asset_system::AssetRepresentation::full_path(), blender::asset_system::AssetRepresentation::online_asset_preview_url(), blender::asset_system::AssetRepresentation::owner_asset_library(), remote_library_asset_preview_path(), blender::asset_system::AssetLibrary::root_path(), and SNPRINTF.
Referenced by blender::asset_system::AssetRepresentation::ensure_previewable(), and remote_library_asset_preview_path().
| std::string blender::asset_system::remote_library_cache_directory_path | ( | StringRefNull | library_dirname | ) |
Get the absolute path to an online library's cache directory using library_dirname as library identifier.
The path is the general cache directory (e.g. $HOME/.cache/blender/remote-assets/) plus the library_dirname as subdirectory.
The resulting path will be shortened to FILE_MAXDIR if necessary.
Definition at line 1033 of file remote_library.cc.
References blender::BKE_appdir_folder_caches(), BLI_path_join, blender::StringRefNull::c_str(), FILE_MAXDIR, and remote_library_cache_directory_path().
Referenced by online_essentials_cache_directory_path(), remote_library_cache_directory_path(), and remote_library_cache_directory_path_from_url().
| std::string blender::asset_system::remote_library_cache_directory_path_from_url | ( | StringRef | remote_url | ) |
Determine the absolute path of the asset library's on-disk cache directory for downloaded files, based on the library's URL.
The path is the general cache directory (e.g. $HOME/.cache/blender/remote-assets/) plus a shortened MD5 hash of the remote URL to identify the library.
This is based on the remote URL of the library, and not the library name, as the name can be user-chosen, so the URL is a more stable identifier. And if there happen to be multiple libraries in the preferences, with the same URL, they'll share the same cache.
The resulting path will be shortened to FILE_MAXDIR if necessary.
Definition at line 1013 of file remote_library.cc.
References BLI_assert_msg, blender::BLI_hash_md5_buffer(), blender::BLI_hash_md5_to_hexdigest(), blender::BLI_strncpy(), blender::blender::StringRefBase::data(), online_essentials_url(), remote_library_cache_directory_path(), remote_library_cache_directory_path_from_url(), REMOTE_LIBRARY_DIRNAME_LEN, and blender::blender::StringRefBase::size().
Referenced by blender::BKE_preferences_remote_asset_library_url_set(), and remote_library_cache_directory_path_from_url().
| void blender::asset_system::remote_library_cancel_all_asset_downloads | ( | bContext & | C | ) |
Definition at line 975 of file remote_library.cc.
References blender::BPY_run_string_exec_with_locals(), C, blender::bke::idprop::create_group(), remote_library_cancel_all_asset_downloads(), and UNUSED_VARS.
Referenced by remote_library_cancel_all_asset_downloads(), and blender::ui::template_running_jobs().
| void blender::asset_system::remote_library_cancel_all_listing_downloads | ( | const bContext & | C | ) |
Definition at line 712 of file remote_library.cc.
References blender::BPY_run_string_exec_with_locals(), C, blender::bke::idprop::create_group(), library_to_status_map(), remote_library_cancel_all_listing_downloads(), blender::asset_system::RemoteLibraryLoadingStatus::set_cancelled(), and UNUSED_VARS.
Referenced by remote_library_cancel_all_listing_downloads(), and blender::ui::template_running_jobs().
| bool blender::asset_system::remote_library_has_unfinished_asset_downloads | ( | ) |
Return true if there is any asset file (any file in an assets file set) being downloaded.
Definition at line 390 of file remote_library.cc.
References blender::asset_system::ProgressTracker::is_any_loading(), and remote_library_has_unfinished_asset_downloads().
Referenced by remote_library_has_unfinished_asset_downloads(), and blender::ui::template_running_jobs().
| void blender::asset_system::remote_library_request_asset_download | ( | const bContext & | C, |
| const AssetRepresentation & | asset, | ||
| ReportList * | reports ) |
Definition at line 840 of file remote_library.cc.
References blender::BKE_report(), blender::BKE_reportf(), C, blender::StringRefNull::c_str(), blender::CTX_wm_manager(), blender::asset_system::ProgressTracker::file_requested(), blender::G, blender::G_FLAG_INTERNET_ALLOW, blender::asset_system::AssetRepresentation::get_name(), blender::asset_system::AssetRepresentation::needs_download(), blender::asset_system::AssetRepresentation::online_asset_files(), blender::asset_system::AssetRepresentation::owner_asset_library(), blender::asset_system::OnlineAssetFile::path, remote_library_request_asset_download(), blender::RPT_ERROR, blender::RPT_WARNING, blender::Span< T >::size(), blender::asset_system::OnlineAssetFile::size_in_bytes, UNUSED_VARS, blender::asset_system::OnlineAssetFile::url, and blender::asset_system::URLWithHash::url.
Referenced by blender::ed::asset::asset_download_exec(), blender::ed::asset::assets_download_exec(), and remote_library_request_asset_download().
| void blender::asset_system::remote_library_request_download | ( | const RemoteLibraryDefinitionRef & | library_definition | ) |
Ensures the remote library cache directory exists, and calls the Python downloader. Doesn't do anything if a download with the library's URL is already ongoing.
Definition at line 660 of file remote_library.cc.
References blender::asset_system::RemoteLibraryDefinitionRef::auth_token, AUTH_TOKEN_MAYBE_OVERRIDE_FROM_EXTENSIONS, BLI_assert_msg, blender::BLI_dir_create_recursive(), blender::BLI_thread_is_main(), blender::BPY_run_string_exec_with_locals(), blender::StringRefNull::c_str(), blender::asset_system::RemoteLibraryDefinitionRef::cache_dirpath, blender::bke::idprop::create_group(), blender::G, blender::G_FLAG_INTERNET_ALLOW, blender::IDP_AddToGroup(), blender::IDP_NewString(), is_online_essentials_dirpath(), is_online_essentials_url(), blender::asset_system::RemoteLibraryLoadingStatus::Loading, remote_library_request_download(), blender::asset_system::RemoteLibraryDefinitionRef::remote_url, and blender::asset_system::RemoteLibraryLoadingStatus::status().
Referenced by blender::ED_userpref_asset_library_new(), blender::asset_system::AllAssetLibrary::force_remote_listing_download(), blender::asset_system::EssentialsAssetLibrary::force_remote_listing_download(), blender::asset_system::RemoteAssetLibrary::force_remote_listing_download(), blender::remote_asset_library_request(), and remote_library_request_download().
| void blender::asset_system::remote_library_request_preview_download | ( | const bContext & | C, |
| const AssetRepresentation & | asset, | ||
| const StringRef | dst_filepath, | ||
| ReportList * | reports ) |
Definition at line 902 of file remote_library.cc.
References AUTH_TOKEN_MAYBE_OVERRIDE_FROM_EXTENSIONS, blender::BKE_report(), blender::BKE_reportf(), blender::BPY_run_string_exec_with_locals(), C, blender::StringRefNull::c_str(), blender::bke::idprop::create_group(), blender::ED_preview_online_download_requested(), blender::G, blender::G_FLAG_INTERNET_ALLOW, blender::asset_system::AssetRepresentation::get_name(), blender::IDP_AddToGroup(), blender::IDP_NewString(), blender::asset_system::AssetRepresentation::online_asset_preview_hash(), blender::asset_system::AssetRepresentation::online_asset_preview_url(), blender::asset_system::AssetRepresentation::owner_asset_library(), remote_library_request_preview_download(), blender::RPT_ERROR, blender::RPT_WARNING, and UNUSED_VARS.
Referenced by blender::asset_system::AssetRepresentation::ensure_previewable(), and remote_library_request_preview_download().
| std::string blender::asset_system::remote_library_top_meta_file_path | ( | const RemoteLibraryDefinitionRef & | library | ) |
Get the absolute file path to the _asset-library-meta.json of the given library's cache directory.
Definition at line 1097 of file remote_library.cc.
References BLI_path_join, FILE_MAX, REMOTE_LIBRARY_TOP_META_FILE_NAME, and remote_library_top_meta_file_path().
Referenced by blender::remote_asset_library_request(), and remote_library_top_meta_file_path().
| float blender::asset_system::remote_library_total_asset_downloads_progress | ( | ) |
Definition at line 367 of file remote_library.cc.
References blender::BLI_assert(), blender::asset_system::ProgressTracker::current, float, and remote_library_total_asset_downloads_progress().
Referenced by remote_library_total_asset_downloads_progress(), and blender::ui::template_running_jobs().
| bool blender::asset_system::remote_library_url_ends_with_top_meta_file_name | ( | const StringRef | url | ) |
Definition at line 1107 of file remote_library.cc.
References blender::blender::StringRefBase::endswith(), REMOTE_LIBRARY_TOP_META_FILE_NAME_LEADING_SLASH, remote_library_url_ends_with_top_meta_file_name(), and blender::blender::StringRefBase::size().
Referenced by blender::BKE_preferences_remote_asset_library_url_set(), is_online_essentials_url(), remote_library_url_ends_with_top_meta_file_name(), and blender::asset_system::tests::TEST().
| bool blender::asset_system::skip_experimental_asset_catalog | ( | const UUID & | catalog_id | ) |
Returns false for catalogs that are based on disabled experimental features.
Definition at line 127 of file essentials_library.cc.
References skip_experimental_asset_catalog().
Referenced by blender::is_filtered_asset(), blender::asset_system::AssetCatalogService::parse_catalog_file(), blender::asset_system::AssetCatalogService::reload_catalogs(), and skip_experimental_asset_catalog().
|
static |
Definition at line 30 of file essentials_library.cc.
| const int8_t blender::asset_system::REMOTE_LIBRARY_DIRNAME_LEN = 16 |
Maximum length of the remote library directory name. Kept short to avoid path length issues with deeply nested asset libraries.
The directory name will be the MD5 hash of the URL.
Definition at line 1011 of file remote_library.cc.
Referenced by remote_library_cache_directory_path_from_url().
|
constexpr |
Definition at line 43 of file AS_remote_library.hh.
Referenced by is_online_essentials_url(), blender::ed::asset::index::AssetLibraryMeta::read(), and remote_library_top_meta_file_path().
|
constexpr |
Definition at line 44 of file AS_remote_library.hh.
Referenced by remote_library_url_ends_with_top_meta_file_name().