Blender  V3.3
Namespaces | Functions
asset_library.cc File Reference
#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 AssetLibraryBKE_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::AssetCatalogServiceBKE_asset_library_get_catalog_service (const ::AssetLibrary *library_c)
 
blender::bke::AssetCatalogTreeBKE_asset_library_get_catalog_tree (const ::AssetLibrary *library)
 
void BKE_asset_library_refresh_catalog_simplename (struct AssetLibrary *asset_library, struct AssetMetaData *asset_data)
 

Function Documentation

◆ BKE_asset_library_find_suitable_root_path_from_main()

bool BKE_asset_library_find_suitable_root_path_from_main ( const Main bmain,
char *  r_library_path 
)

◆ BKE_asset_library_find_suitable_root_path_from_path()

bool BKE_asset_library_find_suitable_root_path_from_path ( const char *  input_path,
char *  r_library_path 
)

◆ BKE_asset_library_get_catalog_service()

blender::bke::AssetCatalogService* BKE_asset_library_get_catalog_service ( const ::AssetLibrary library_c)

◆ BKE_asset_library_get_catalog_tree()

blender::bke::AssetCatalogTree* BKE_asset_library_get_catalog_tree ( const ::AssetLibrary library)

◆ BKE_asset_library_has_any_unsaved_catalogs()

bool BKE_asset_library_has_any_unsaved_catalogs ( void  )

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().

◆ BKE_asset_library_load()

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().

◆ BKE_asset_library_refresh_catalog_simplename()

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.