|
Blender V4.3
|
#include <cstring>#include <utility>#include "DNA_ID.h"#include "DNA_defaults.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_string_ref.hh"#include "BLI_string_utf8.h"#include "BLI_string_utils.hh"#include "BLI_uuid.h"#include "BKE_asset.hh"#include "BKE_idprop.hh"#include "BKE_preview_image.hh"#include "BLO_read_write.hh"#include "MEM_guardedalloc.h"Go to the source code of this file.
|
static |
Definition at line 98 of file asset.cc.
References BLI_addtail(), BLI_assert, BLI_listbase_count(), MEM_callocN, AssetTag::name, STRNCPY_UTF8, AssetMetaData::tags, and AssetMetaData::tot_tags.
Referenced by BKE_asset_metadata_tag_add(), and BKE_asset_metadata_tag_ensure().
| void BKE_asset_library_reference_init_default | ( | AssetLibraryReference * | library_ref | ) |
Definition at line 149 of file asset.cc.
References DNA_struct_default_get.
Referenced by blo_do_versions_300(), and workspace_init_data().
| void BKE_asset_metadata_catalog_id_clear | ( | AssetMetaData * | asset_data | ) |
Clean up the catalog ID (white-spaces removed, length reduced, etc.) and assign it.
Definition at line 154 of file asset.cc.
References BLI_uuid_nil(), AssetMetaData::catalog_id, and AssetMetaData::catalog_simple_name.
Referenced by blender::bke::tests::TEST().
| void BKE_asset_metadata_catalog_id_set | ( | AssetMetaData * | asset_data, |
| const ::bUUID | catalog_id, | ||
| const char * | catalog_simple_name ) |
Definition at line 160 of file asset.cc.
References AssetMetaData::catalog_id, AssetMetaData::catalog_simple_name, blender::StringRefBase::copy(), blender::StringRefBase::substr(), and blender::StringRefBase::trim().
| AssetMetaData * BKE_asset_metadata_copy | ( | const AssetMetaData * | source | ) |
Create a copy of the AssetMetaData so that it can be assigned to another asset.
The caller becomes the owner of the returned pointer.
Definition at line 44 of file asset.cc.
Referenced by BKE_libblock_copy_in_lib(), and blender::ed::asset::copy_to_id().
| AssetMetaData * BKE_asset_metadata_create | ( | ) |
Definition at line 32 of file asset.cc.
References DNA_struct_default_get.
Referenced by blender::ed::asset::index::init_indexer_entry_from_value(), and blender::ed::asset::mark_id().
| void BKE_asset_metadata_free | ( | AssetMetaData ** | asset_data | ) |
Definition at line 38 of file asset.cc.
Referenced by BKE_lib_id_clear_library_data(), BKE_libblock_free_data(), BLO_datablock_info_free(), blender::ed::asset::clear_id(), and blender::ed::asset::copy_to_id().
| void BKE_asset_metadata_idprop_ensure | ( | AssetMetaData * | asset_data, |
| IDProperty * | prop ) |
Definition at line 175 of file asset.cc.
References IDP_ReplaceInGroup(), and AssetMetaData::properties.
Referenced by blender::bke::action_asset_metadata_ensure(), brush_asset_metadata_ensure(), blender::bke::node_update_asset_metadata(), and object_asset_metadata_ensure().
| IDProperty * BKE_asset_metadata_idprop_find | ( | const AssetMetaData * | asset_data, |
| const char * | name ) |
Definition at line 186 of file asset.cc.
References IDP_GetPropertyFromGroup(), and AssetMetaData::properties.
Referenced by blender::ed::geometry::build_catalog_tree(), blender::ed::object::build_catalog_tree(), blender::ed::space_node::build_catalog_tree(), blender::ed::space_node::node_group_drop_poll(), blender::ed::geometry::run_node_group_depends_on_cursor(), blender::ed::space_node::search_link_ops_for_asset_metadata(), view3d_geometry_nodes_drop_poll(), and view3d_ob_drop_on_enter().
| PreviewImage * BKE_asset_metadata_preview_get_from_id | ( | const AssetMetaData * | asset_data, |
| const ID * | owner_id ) |
Definition at line 196 of file asset.cc.
References BKE_previewimg_id_get().
Referenced by filelist_readjob_main_assets_add_items().
| void BKE_asset_metadata_read | ( | BlendDataReader * | reader, |
| AssetMetaData * | asset_data ) |
Definition at line 222 of file asset.cc.
References AssetMetaData::author, BLI_assert, BLI_listbase_count(), BLO_read_string(), BLO_read_struct, BLO_read_struct_list, AssetMetaData::copyright, AssetMetaData::description, IDP_BlendDataRead, AssetMetaData::license, AssetMetaData::local_type_info, AssetMetaData::properties, AssetMetaData::tags, and AssetMetaData::tot_tags.
Referenced by blo_read_asset_data_block(), and direct_link_id_common().
| AssetTag * BKE_asset_metadata_tag_add | ( | AssetMetaData * | asset_data, |
| const char * | name ) |
Definition at line 111 of file asset.cc.
References asset_metadata_tag_add(), BLI_uniquename(), AssetTag::name, offsetof, and AssetMetaData::tags.
| AssetTagEnsureResult BKE_asset_metadata_tag_ensure | ( | AssetMetaData * | asset_data, |
| const char * | name ) |
Make sure there is a tag with name name, create one if needed.
Definition at line 118 of file asset.cc.
References asset_metadata_tag_add(), BLI_findstring(), offsetof, result, and AssetMetaData::tags.
| void BKE_asset_metadata_tag_remove | ( | AssetMetaData * | asset_data, |
| AssetTag * | tag ) |
Definition at line 140 of file asset.cc.
References BLI_assert, BLI_findindex(), BLI_freelinkN(), BLI_listbase_count(), AssetMetaData::tags, and AssetMetaData::tot_tags.
| void BKE_asset_metadata_write | ( | BlendWriter * | writer, |
| AssetMetaData * | asset_data ) |
Definition at line 204 of file asset.cc.
References AssetMetaData::author, BLO_write_string(), BLO_write_struct, AssetMetaData::copyright, AssetMetaData::description, IDP_BlendWrite(), AssetMetaData::license, LISTBASE_FOREACH, AssetMetaData::properties, and AssetMetaData::tags.
Referenced by BKE_id_blend_write().