Brush Assets: Add catalog option to asset pushing operator #118382
|
@ -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*/) {
|
||||
|
||||
asset_library_ensure_catalog(library, parent / component_name);
|
||||
parent = parent / component_name;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
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 ofasset_library_ensure_catalogs_in_path
below.