Blender V5.3
blender::asset_system::OnlineAssetInfo Struct Reference

#include <AS_remote_library.hh>

Public Member Functions

StringRefNull asset_file () const

Public Attributes

Vector< OnlineAssetFile > files
std::optional< URLWithHash > preview_url

Detailed Description

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.

Member Function Documentation

◆ asset_file()

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().

Member Data Documentation

◆ files

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().

◆ preview_url

std::optional<URLWithHash> blender::asset_system::OnlineAssetInfo::preview_url

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