|
Blender V4.5
|
#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 asset_metadata_tag_add(), BLI_addtail(), BLI_assert, BLI_listbase_count(), MEM_callocN(), AssetTag::name, STRNCPY_UTF8, AssetMetaData::tags, and AssetMetaData::tot_tags.
Referenced by asset_metadata_tag_add(), 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 BKE_asset_library_reference_init_default(), and DNA_struct_default_get.
Referenced by BKE_asset_library_reference_init_default(), BKE_asset_metadata_catalog_id_set(), 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 BKE_asset_metadata_catalog_id_clear(), BLI_uuid_nil(), AssetMetaData::catalog_id, and AssetMetaData::catalog_simple_name.
Referenced by BKE_asset_metadata_catalog_id_clear(), BKE_asset_metadata_tag_add(), and 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 BKE_asset_metadata_catalog_id_set(), AssetMetaData::catalog_id, AssetMetaData::catalog_simple_name, and StringRef::StringRef().
| 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.
References BKE_asset_metadata_copy().
Referenced by BKE_asset_metadata_copy(), BKE_libblock_copy_in_lib(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), and blender::ed::asset::copy_to_id().
| AssetMetaData * BKE_asset_metadata_create | ( | ) |
Definition at line 32 of file asset.cc.
References BKE_asset_metadata_create(), and DNA_struct_default_get.
Referenced by BKE_asset_metadata_create(), 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.
References BKE_asset_metadata_free().
Referenced by BKE_asset_metadata_free(), BKE_lib_id_clear_library_data(), BKE_libblock_free_data(), BLO_datablock_info_free(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), 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 168 of file asset.cc.
References BKE_asset_metadata_idprop_ensure(), blender::bke::idprop::create_group(), IDP_ReplaceInGroup(), and AssetMetaData::properties.
Referenced by blender::bke::action_asset_metadata_ensure(), BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_idprop_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 179 of file asset.cc.
References BKE_asset_metadata_idprop_find(), IDP_GetPropertyFromGroup(), and AssetMetaData::properties.
Referenced by BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_idprop_find(), 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 189 of file asset.cc.
References BKE_asset_metadata_preview_get_from_id(), and BKE_previewimg_id_get().
Referenced by BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_preview_get_from_id(), and filelist_readjob_main_assets_add_items().
| void BKE_asset_metadata_read | ( | BlendDataReader * | reader, |
| AssetMetaData * | asset_data ) |
Definition at line 215 of file asset.cc.
References AssetMetaData::author, BKE_asset_metadata_read(), 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 BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_read(), 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(), BKE_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(), BKE_asset_metadata_tag_ensure(), BLI_findstring(), offsetof, result, and AssetMetaData::tags.
Referenced by BKE_asset_metadata_tag_add(), and BKE_asset_metadata_tag_ensure().
| void BKE_asset_metadata_tag_remove | ( | AssetMetaData * | asset_data, |
| AssetTag * | tag ) |
Definition at line 140 of file asset.cc.
References BKE_asset_metadata_tag_remove(), BLI_assert, BLI_findindex(), BLI_freelinkN(), BLI_listbase_count(), AssetMetaData::tags, and AssetMetaData::tot_tags.
Referenced by BKE_asset_metadata_tag_add(), and BKE_asset_metadata_tag_remove().
| void BKE_asset_metadata_write | ( | BlendWriter * | writer, |
| AssetMetaData * | asset_data ) |
Definition at line 197 of file asset.cc.
References AssetMetaData::author, BKE_asset_metadata_write(), BLO_write_string(), BLO_write_struct, AssetMetaData::copyright, AssetMetaData::description, IDP_BlendWrite(), AssetMetaData::license, LISTBASE_FOREACH, AssetMetaData::properties, and AssetMetaData::tags.
Referenced by BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_write(), and BKE_id_blend_write().