Changeset View
Changeset View
Standalone View
Standalone View
source/blender/asset_system/AS_asset_library.h
- This file was moved from source/blender/blenkernel/BKE_asset_library.h.
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup bke | * \ingroup asset_system | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| struct IDRemapper; | struct IDRemapper; | ||||
| struct Main; | struct Main; | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| /** Forward declaration, defined in intern/asset_library.hh */ | /** Forward declaration, defined in intern/asset_library.hh */ | ||||
| typedef struct AssetLibrary AssetLibrary; | typedef struct AssetLibrary AssetLibrary; | ||||
| /** | /** | ||||
| * Return the #AssetLibrary rooted at the given directory path. | * Return the #AssetLibrary rooted at the given directory path. | ||||
| * | * | ||||
| * Will return the same pointer for repeated calls, until another blend file is loaded. | * Will return the same pointer for repeated calls, until another blend file is loaded. | ||||
| * | * | ||||
| * To get the in-memory-only "current file" asset library, pass an empty path. | * To get the in-memory-only "current file" asset library, pass an empty path. | ||||
| */ | */ | ||||
| struct AssetLibrary *BKE_asset_library_load(const char *library_path); | struct AssetLibrary *AS_asset_library_load(const char *library_path); | ||||
| /** Look up the asset's catalog and copy its simple name into #asset_data. */ | /** Look up the asset's catalog and copy its simple name into #asset_data. */ | ||||
| void BKE_asset_library_refresh_catalog_simplename(struct AssetLibrary *asset_library, | void AS_asset_library_refresh_catalog_simplename(struct AssetLibrary *asset_library, | ||||
| struct AssetMetaData *asset_data); | struct AssetMetaData *asset_data); | ||||
| /** Return whether any loaded AssetLibrary has unsaved changes to its catalogs. */ | /** Return whether any loaded AssetLibrary has unsaved changes to its catalogs. */ | ||||
| bool BKE_asset_library_has_any_unsaved_catalogs(void); | bool AS_asset_library_has_any_unsaved_catalogs(void); | ||||
| /** An asset library can include local IDs (IDs in the current file). Their pointers need to be | /** An asset library can include local IDs (IDs in the current file). Their pointers need to be | ||||
| * remapped on change (or assets removed as IDs gets removed). */ | * remapped on change (or assets removed as IDs gets removed). */ | ||||
| void BKE_asset_library_remap_ids(struct IDRemapper *mappings); | void AS_asset_library_remap_ids(struct IDRemapper *mappings); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||