Brush Assets: Add catalog option to asset pushing operator #118382

Merged
Hans Goudey merged 26 commits from HooglyBoogly/blender:brush-assets-save-catalog-option into brush-assets-project 2024-02-21 14:03:41 +01:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit bcacc3c72d - Show all commits

View File

@ -1274,7 +1274,7 @@ static asset_system::AssetCatalog &asset_library_ensure_catalogs_in_path(
/* Adding multiple catalogs in a path at a time with #AssetCatalogService::create_catalog()
* doesn't work; add each potentially new catalog in the hierarchy manually here. */
asset_system::AssetCatalogPath parent = "";
path.iterate_components([&](StringRef component_name, bool is_last_component) {
path.iterate_components([&](StringRef component_name, bool /*is_last_component*/) {

Creating a catalog with missing parent catalogs should work fine, the parents would be created with create_missing_catalogs(). Is this not working for you?

Creating a catalog with missing parent catalogs should work fine, the parents would be created with `create_missing_catalogs()`. Is this not working for you?

No, that's the infinite recursion I was mentioning in chat. It creates the missing parent catalogs with a null catalog ID and an empty simple name. If you want, you should be able to reproduce it by calling asset_library_ensure_catalog instead of asset_library_ensure_catalogs_in_path below.

No, that's the infinite recursion I was mentioning in chat. It creates the missing parent catalogs with a null catalog ID and an empty simple name. If you want, you should be able to reproduce it by calling `asset_library_ensure_catalog` instead of `asset_library_ensure_catalogs_in_path` below.
asset_library_ensure_catalog(library, parent / component_name);
parent = parent / component_name;
});