Blender
V3.3
|
Go to the source code of this file.
Functions | |
bool | ED_asset_mark_id (struct ID *id) |
void | ED_asset_generate_preview (const struct bContext *C, struct ID *id) |
bool | ED_asset_clear_id (struct ID *id) |
void | ED_assets_pre_save (struct Main *bmain) |
bool | ED_asset_can_mark_single_from_context (const struct bContext *C) |
Referenced by ui_popup_context_menu_for_button().
Remove the asset metadata, turning the ID into a "normal" ID.
This clears the Fake User. If for some reason the datablock is meant to be saved anyway, the caller is responsible for explicitly setting the Fake User.
Definition at line 59 of file asset_mark_clear.cc.
References ID::asset_data, BKE_asset_metadata_free(), ED_assetlist_storage_tag_main_data_dirty(), id, and id_fake_user_clear().
Referenced by AssetClearHelper::operator()().
Generate preview image for the given datablock.
The preview image might be generated using a background thread.
Referenced by AssetMarkHelper::operator()().
Mark the datablock as asset.
To ensure the datablock is saved, this sets Fake User.
Definition at line 28 of file asset_mark_clear.cc.
References ID::asset_data, IDTypeInfo::asset_type_info, BKE_asset_metadata_create(), BKE_id_can_be_asset(), BKE_idtype_get_info_from_id(), ED_assetlist_storage_tag_main_data_dirty(), id, and id_fake_user_set().
Referenced by AssetMarkHelper::operator()().
Definition at line 73 of file asset_mark_clear.cc.
References ID::asset_data, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, id, AssetMetaData::local_type_info, and AssetTypeInfo::pre_save_fn.
Referenced by wm_file_write(), and wm_homefile_write_exec().