Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_asset.h
| Show All 17 Lines | |||||
| struct AssetLibraryReference; | struct AssetLibraryReference; | ||||
| struct AssetMetaData; | struct AssetMetaData; | ||||
| struct BlendDataReader; | struct BlendDataReader; | ||||
| struct BlendWriter; | struct BlendWriter; | ||||
| struct ID; | struct ID; | ||||
| struct IDProperty; | struct IDProperty; | ||||
| struct PreviewImage; | struct PreviewImage; | ||||
| /** C handle for #bke::AssetRepresentation. */ | |||||
| typedef struct AssetRepresentation AssetRepresentation; | |||||
| typedef void (*PreSaveFn)(void *asset_ptr, struct AssetMetaData *asset_data); | typedef void (*PreSaveFn)(void *asset_ptr, struct AssetMetaData *asset_data); | ||||
| typedef struct AssetTypeInfo { | typedef struct AssetTypeInfo { | ||||
| /** | /** | ||||
| * For local assets (assets in the current .blend file), a callback to execute before the file is | * For local assets (assets in the current .blend file), a callback to execute before the file is | ||||
| * saved. | * saved. | ||||
| */ | */ | ||||
| PreSaveFn pre_save_fn; | PreSaveFn pre_save_fn; | ||||
| Show All 29 Lines | struct IDProperty *BKE_asset_metadata_idprop_find(const struct AssetMetaData *asset_data, | ||||
| const char *name) ATTR_WARN_UNUSED_RESULT; | const char *name) ATTR_WARN_UNUSED_RESULT; | ||||
| struct PreviewImage *BKE_asset_metadata_preview_get_from_id(const struct AssetMetaData *asset_data, | struct PreviewImage *BKE_asset_metadata_preview_get_from_id(const struct AssetMetaData *asset_data, | ||||
| const struct ID *owner_id); | const struct ID *owner_id); | ||||
| void BKE_asset_metadata_write(struct BlendWriter *writer, struct AssetMetaData *asset_data); | void BKE_asset_metadata_write(struct BlendWriter *writer, struct AssetMetaData *asset_data); | ||||
| void BKE_asset_metadata_read(struct BlendDataReader *reader, struct AssetMetaData *asset_data); | void BKE_asset_metadata_read(struct BlendDataReader *reader, struct AssetMetaData *asset_data); | ||||
| const char *BKE_asset_representation_name_get(const AssetRepresentation *asset) | |||||
| ATTR_WARN_UNUSED_RESULT; | |||||
| AssetMetaData *BKE_asset_representation_metadata_get(const AssetRepresentation *asset) | |||||
| ATTR_WARN_UNUSED_RESULT; | |||||
| bool BKE_asset_representation_is_local_id(const AssetRepresentation *asset) | |||||
| ATTR_WARN_UNUSED_RESULT; | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| # include <memory> | # include <memory> | ||||
| [[nodiscard]] std::unique_ptr<AssetMetaData> BKE_asset_metadata_move_to_unique_ptr( | [[nodiscard]] std::unique_ptr<AssetMetaData> BKE_asset_metadata_move_to_unique_ptr( | ||||
| AssetMetaData *asset_data); | AssetMetaData *asset_data); | ||||
| #endif | #endif | ||||