Blender
V3.3
|
#include <memory>
#include "BKE_asset_library.hh"
#include "BKE_main.h"
#include "BKE_preferences.h"
#include "BLI_path_util.h"
#include "DNA_asset_types.h"
#include "DNA_userdef_types.h"
#include "asset_library_service.hh"
Go to the source code of this file.
Namespaces | |
blender | |
blender::bke | |
Functions | |
struct AssetLibrary * | BKE_asset_library_load (const char *library_path) |
bool | BKE_asset_library_has_any_unsaved_catalogs () |
bool | BKE_asset_library_find_suitable_root_path_from_path (const char *input_path, char *r_library_path) |
bool | BKE_asset_library_find_suitable_root_path_from_main (const Main *bmain, char *r_library_path) |
blender::bke::AssetCatalogService * | BKE_asset_library_get_catalog_service (const ::AssetLibrary *library_c) |
blender::bke::AssetCatalogTree * | BKE_asset_library_get_catalog_tree (const ::AssetLibrary *library) |
void | BKE_asset_library_refresh_catalog_simplename (struct AssetLibrary *asset_library, struct AssetMetaData *asset_data) |
bool BKE_asset_library_find_suitable_root_path_from_main | ( | const Main * | bmain, |
char * | r_library_path | ||
) |
Definition at line 58 of file asset_library.cc.
References BKE_asset_library_find_suitable_root_path_from_path(), and Main::filepath.
bool BKE_asset_library_find_suitable_root_path_from_path | ( | const char * | input_path, |
char * | r_library_path | ||
) |
Definition at line 45 of file asset_library.cc.
References BKE_preferences_asset_library_containing_path(), BLI_split_dir_part(), BLI_strncpy(), and FILE_MAXDIR.
Referenced by BKE_asset_library_find_suitable_root_path_from_main().
blender::bke::AssetCatalogService* BKE_asset_library_get_catalog_service | ( | const ::AssetLibrary * | library_c | ) |
Definition at line 63 of file asset_library.cc.
References library.
Referenced by BKE_asset_library_get_catalog_tree(), ED_asset_catalog_add(), ED_asset_catalog_move(), ED_asset_catalog_remove(), ED_asset_catalog_rename(), ED_asset_catalogs_save_from_main_path(), file_ensure_updated_catalog_filter_data(), get_catalog_service(), and blender::ed::asset_browser::AssetCatalogDropController::get_drag_catalog().
blender::bke::AssetCatalogTree* BKE_asset_library_get_catalog_tree | ( | const ::AssetLibrary * | library | ) |
Definition at line 75 of file asset_library.cc.
References BKE_asset_library_get_catalog_service(), blender::bke::AssetCatalogService::get_catalog_tree(), and library.
Return whether any loaded AssetLibrary has unsaved changes to its catalogs.
Definition at line 39 of file asset_library.cc.
References blender::bke::AssetLibraryService::get(), and blender::bke::AssetLibraryService::has_any_unsaved_catalogs().
Referenced by asset_catalogs_save_poll(), block_create__close_file_dialog(), and wm_file_or_session_data_has_unsaved_changes().
struct AssetLibrary* BKE_asset_library_load | ( | const char * | library_path | ) |
Loading an asset library at this point only means loading the catalogs. Later on this should invoke reading of asset representations too.
Definition at line 26 of file asset_library.cc.
References blender::bke::AssetLibraryService::get(), blender::bke::AssetLibraryService::get_asset_library_current_file(), blender::bke::AssetLibraryService::get_asset_library_on_disk(), and lib.
Referenced by filelist_readjob_load_asset_library_data(), and blender::bke::tests::TEST_F().
void BKE_asset_library_refresh_catalog_simplename | ( | struct AssetLibrary * | asset_library, |
struct AssetMetaData * | asset_data | ||
) |
Look up the asset's catalog and copy its simple name into #asset_data.
Definition at line 86 of file asset_library.cc.
References lib.