Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-09-30 18:30:30 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-09-30 18:34:58 +0300
commitdd3391dd996e90fba3227c1cc2b50f4ef490ccdb (patch)
tree5a60f7589bb36be75f7bd1624925ef3f281bd927 /source/blender/blenkernel/BKE_asset_catalog_path.hh
parent4389067929d9a57923b7a85ec29b8ca9633fef29 (diff)
Asset Catalogs: create missing parent catalogs
For every known catalog, ensure its parent catalog also exists. This ensures that assets can be assigned to parent catalogs, even when they didn't exist in the Catalog Definition File yet.
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_catalog_path.hh')
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog_path.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog_path.hh b/source/blender/blenkernel/BKE_asset_catalog_path.hh
index 1e53df553a9..b150f805ed5 100644
--- a/source/blender/blenkernel/BKE_asset_catalog_path.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog_path.hh
@@ -112,6 +112,11 @@ class AssetCatalogPath {
bool is_contained_in(const AssetCatalogPath &other_path) const;
/**
+ * \return the parent path, or an empty path if there is no parent.
+ */
+ AssetCatalogPath parent() const;
+
+ /**
* Change the initial part of the path from `from_path` to `to_path`.
* If this path does not start with `from_path`, return an empty path as result.
*