|
Blender V5.3
|
#include <AS_remote_library.hh>
Public Member Functions | |
| StringRefNull | asset_file () const |
Public Attributes | |
| Vector< OnlineAssetFile > | files |
| std::optional< URLWithHash > | preview_url |
Information specific to online assets.
This is constructed from the remote asset listing and contains all data needed to download and verify related fragments. AssetRepresentation stores this for online assets.
Definition at line 90 of file AS_remote_library.hh.
| StringRefNull blender::asset_system::OnlineAssetInfo::asset_file | ( | ) | const |
Return the asset's main file, i.e. the file containing the asset data-block.
This can only return an empty string in error cases, i.e. when the files vector (see above) is empty. This should never happen; file-less assets should be rejected when loading the listing.
NOTE: Blender currently only has preliminary support for multi-file assets (it downloads them correctly, but there's little in place to check for conflicting versions, or to handle things like copying non-blend files to the project directory). Even though the 'files' list will likely only have one element (at least that is the case at the time of writing), this function should not be used as a shortcut when trying to obtain "the asset's files".
Definition at line 993 of file remote_library.cc.
References files.
Referenced by blender::ed::asset::index::listing_entries_from_root().
| Vector<OnlineAssetFile> blender::asset_system::OnlineAssetInfo::files |
The files for this asset. The first one contains the asset data-blocks, and subsequent files are dependencies.
Definition at line 95 of file AS_remote_library.hh.
Referenced by asset_file(), and blender::ed::asset::index::listing_entry_from_asset_dictionary().
| std::optional<URLWithHash> blender::asset_system::OnlineAssetInfo::preview_url |
Definition at line 96 of file AS_remote_library.hh.
Referenced by blender::ed::asset::index::listing_entry_from_asset_dictionary().