Blender  V3.3
Public Attributes | List of all members
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 AssetTypeInfolocal_type_info
 
struct IDPropertyproperties
 
struct bUUID catalog_id
 
char catalog_simple_name [64]
 
char * author
 
char * description
 
ListBase tags
 
short active_tag
 
short tot_tags
 
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 44 of file DNA_asset_types.h.

Member Data Documentation

◆ _pad

char AssetMetaData::_pad[4]

Definition at line 79 of file DNA_asset_types.h.

◆ active_tag

short AssetMetaData::active_tag

Definition at line 74 of file DNA_asset_types.h.

◆ author

char* AssetMetaData::author

◆ catalog_id

struct bUUID AssetMetaData::catalog_id

◆ catalog_simple_name

char 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 62 of file DNA_asset_types.h.

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

◆ description

char* AssetMetaData::description

Optional description of this asset for display in the UI. Dynamic length.

Definition at line 68 of file DNA_asset_types.h.

Referenced by BKE_asset_metadata_read(), BKE_asset_metadata_write(), blender::ed::asset::index::init_indexer_entry_from_value(), and blender::ed::asset::index::init_value_from_file_indexer_entry().

◆ local_type_info

struct AssetTypeInfo* AssetMetaData::local_type_info

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

Definition at line 46 of file DNA_asset_types.h.

Referenced by BKE_asset_metadata_read(), and ED_assets_pre_save().

◆ properties

struct IDProperty* AssetMetaData::properties

◆ tags

ListBase AssetMetaData::tags

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 73 of file DNA_asset_types.h.

Referenced by asset_metadata_tag_add(), asset_tag_matches_filter(), BKE_asset_metadata_read(), BKE_asset_metadata_tag_add(), BKE_asset_metadata_tag_remove(), BKE_asset_metadata_write(), ED_asset_filter_matches_asset(), and blender::ed::asset::index::init_value_from_file_indexer_entry().

◆ tot_tags

short AssetMetaData::tot_tags

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 77 of file DNA_asset_types.h.

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


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