Blender
V3.3
|
#include "DNA_ID.h"
#include "BKE_asset.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "UI_interface_icons.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "ED_asset_list.h"
#include "ED_asset_mark_clear.h"
#include "ED_asset_type.h"
Go to the source code of this file.
Functions | |
bool | ED_asset_mark_id (ID *id) |
void | ED_asset_generate_preview (const bContext *C, ID *id) |
bool | ED_asset_clear_id (ID *id) |
void | ED_assets_pre_save (struct Main *bmain) |
bool | ED_asset_can_mark_single_from_context (const bContext *C) |
Functions for marking and clearing assets.
Definition in file asset_mark_clear.cc.
Definition at line 88 of file asset_mark_clear.cc.
References C, CTX_data_pointer_get_type_silent(), PointerRNA::data, and ED_asset_type_is_supported().
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()().
Definition at line 49 of file asset_mark_clear.cc.
References BKE_previewimg_clear(), BKE_previewimg_id_get(), C, G, ICON_SIZE_PREVIEW, usdtokens::preview(), and UI_icon_render_id().
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().