25using namespace blender::asset_system;
101 if (new_path == catalog->
path || clean_new_path == catalog->
path) {
114 const std::optional<CatalogID> dst_parent_catalog_id)
129 if (!dst_catalog && dst_parent_catalog_id) {
135 catalog_service, src_catalog->
path.
name(), dst_catalog ? dst_catalog->
path.
c_str() :
"");
142 if (new_path == src_catalog->
path || clean_new_path == src_catalog->
path) {
174 char *file_path =
nullptr;
176 &reference, asset_full_path_buffer, &file_path,
nullptr,
nullptr);
void AS_asset_full_path_explode_from_weak_ref(const AssetWeakReference *asset_reference, char r_path_buffer[1282], char **r_dir, char **r_group, char **r_name)
#define BLI_assert_unreachable()
size_t void BLI_uniquename_cb(blender::FunctionRef< bool(blender::StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2
#define ND_SPACE_ASSET_PARAMS
AssetCatalogPath parent() const
AssetCatalogPath cleanup() const
const char * c_str() const
StringRefNull name() const
AssetCatalog * find_catalog_by_path(const AssetCatalogPath &path) const
AssetCatalog * find_catalog(CatalogID catalog_id) const
bool write_to_disk(const CatalogFilePath &blend_file_path)
AssetCatalog * create_catalog(const AssetCatalogPath &catalog_path)
void update_catalog_path(CatalogID catalog_id, const AssetCatalogPath &new_catalog_path)
bool is_read_only() const
void prune_catalogs_by_id(CatalogID catalog_id)
void tag_has_unsaved_changes(AssetCatalog *edited_catalog=nullptr)
static bool save_catalogs_when_file_is_saved
AssetCatalogService & catalog_service() const
void catalog_remove(asset_system::AssetLibrary *library, const asset_system::CatalogID &catalog_id)
bool catalogs_read_only(const asset_system::AssetLibrary &library)
void catalogs_save_from_main_path(asset_system::AssetLibrary *library, const Main *bmain)
static std::string catalog_name_ensure_unique(AssetCatalogService &catalog_service, StringRefNull name, StringRef parent_path)
asset_system::AssetCatalog * catalog_add(asset_system::AssetLibrary *library, StringRefNull name, StringRef parent_path=nullptr)
void catalog_move(asset_system::AssetLibrary *library, asset_system::CatalogID src_catalog_id, std::optional< asset_system::CatalogID > dst_parent_catalog_id=std::nullopt)
void catalogs_save_from_asset_reference(asset_system::AssetLibrary &library, const AssetWeakReference &reference)
void catalogs_set_save_catalogs_when_file_is_saved(bool should_save)
bool catalogs_get_save_catalogs_when_file_is_saved()
void catalog_rename(asset_system::AssetLibrary *library, asset_system::CatalogID catalog_id, StringRefNull new_name)
static void unique_name(bNode *node)
void WM_main_add_notifier(uint type, void *reference)