Blender V5.3
blender::AssetMetaData Struct Reference

The meta-data of an asset. By creating and giving this for a data-block (#ID.asset_data), the data-block becomes an asset. More...

#include <DNA_asset_types.h>

Public Attributes

struct AssetTypeInfo * local_type_info = nullptr
struct IDProperty * properties = nullptr
struct bUUID catalog_id
char catalog_simple_name [64] = ""
char * author = nullptr
char * description = nullptr
char * copyright = nullptr
char * license = nullptr
ListBaseT< AssetTag > tags = {nullptr, nullptr}
short active_tag = 0
short tot_tags = 0
AssetMetaDataFlag flag = {}
eAssetImportMethod preferred_import_method = ASSET_IMPORT_APPEND
char _pad [4] = {}

Detailed Description

The meta-data of an asset. By creating and giving this for a data-block (#ID.asset_data), the data-block becomes an asset.

Note
This struct must be readable without having to read anything but blocks from the ID it is attached to! That way, asset information of a file can be read, without reading anything more than that from the file. So pointers to other IDs or ID data are strictly forbidden.

Definition at line 104 of file DNA_asset_types.h.

Member Data Documentation

◆ _pad

char blender::AssetMetaData::_pad[4] = {}

Definition at line 151 of file DNA_asset_types.h.

◆ active_tag

short blender::AssetMetaData::active_tag = 0

Definition at line 140 of file DNA_asset_types.h.

◆ author

◆ catalog_id

◆ catalog_simple_name

char blender::AssetMetaData::catalog_simple_name[64] = ""

Short name of the asset's catalog. This is for debugging purposes only, to allow (partial) reconstruction of asset catalogs in the unfortunate case that the mapping from catalog UUID to catalog path is lost. The catalog's simple name is copied to catalog_simple_name whenever catalog_id is updated.

Definition at line 122 of file DNA_asset_types.h.

Referenced by blender::ed::asset::index::asset_metadata_from_dictionary(), blender::BKE_asset_metadata_catalog_id_clear(), blender::BKE_asset_metadata_catalog_id_set(), blender::ed::asset::index::init_value_from_file_indexer_entry(), blender::asset_system::AssetLibrary::refresh_catalog_simplename(), blender::asset_system::tests::TEST_F(), and blender::bke::tests::TEST_F().

◆ copyright

char* blender::AssetMetaData::copyright = nullptr

◆ description

◆ flag

◆ license

char* blender::AssetMetaData::license = nullptr

◆ local_type_info

struct AssetTypeInfo* blender::AssetMetaData::local_type_info = nullptr

Runtime type, to reference event callbacks. Only valid for local assets.

Definition at line 106 of file DNA_asset_types.h.

Referenced by blender::BKE_asset_metadata_read().

◆ preferred_import_method

eAssetImportMethod blender::AssetMetaData::preferred_import_method = ASSET_IMPORT_APPEND

The import method to use when "Follow Asset or Preferences" is used and #AssetMetaDataFlag::ASSETDATA_USE_OWN_IMPORT_METHOD is set in the flags above.

Definition at line 149 of file DNA_asset_types.h.

Referenced by blender::ed::asset::index::asset_metadata_from_dictionary(), and blender::ed::asset::index::init_value_from_file_indexer_entry().

◆ properties

◆ tags

ListBaseT<AssetTag> blender::AssetMetaData::tags = {nullptr, nullptr}

User defined tags for this asset. The asset manager uses these for filtering, but how they function exactly (e.g. how they are registered to provide a list of searchable available tags) is up to the asset-engine.

Definition at line 139 of file DNA_asset_types.h.

Referenced by blender::asset_metadata_tag_add(), blender::BKE_asset_metadata_read(), blender::BKE_asset_metadata_tag_add(), blender::BKE_asset_metadata_tag_ensure(), blender::BKE_asset_metadata_tag_remove(), blender::BKE_asset_metadata_write(), blender::filelist_filter_and_sort_assets(), blender::ed::asset::filter_matches_asset(), and blender::ed::asset::index::init_value_from_file_indexer_entry().

◆ tot_tags

short blender::AssetMetaData::tot_tags = 0

Store the number of tags to avoid continuous counting. Could be turned into runtime data, we can always reliably reconstruct it from the list.

Definition at line 143 of file DNA_asset_types.h.

Referenced by blender::asset_metadata_tag_add(), blender::BKE_asset_metadata_read(), and blender::BKE_asset_metadata_tag_remove().


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