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-10-21 17:06:14 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-21 17:06:14 +0300
commit4b48b1079d9175a5b86b2299c902cac0fbe27f09 (patch)
tree89f4d53d2a715d1aa7aa57733c30189d003a1f85 /source/blender/blenkernel/BKE_asset_catalog.hh
parent5ccec8ec6bed3e0eda1cffaae565fdfaccd2a6ac (diff)
Asset Catalogs: refresh simple name when renaming catalog
When renaming an asset catalog, also update its simple name. Catalogs will most likely be created from within Blender, so via the catalog tree in the asset browser. Here catalogs are always named "Catalog" until the user renames them, which was reflected in all simple names being "Catalog".
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_catalog.hh')
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh
index 5de74efe2cf..cbb15780a68 100644
--- a/source/blender/blenkernel/BKE_asset_catalog.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog.hh
@@ -415,6 +415,9 @@ class AssetCatalog {
*/
static std::unique_ptr<AssetCatalog> from_path(const AssetCatalogPath &path);
+ /** Make a new simple name for the catalog, based on its path. */
+ void simple_name_refresh();
+
protected:
/** Generate a sensible catalog ID for the given path. */
static std::string sensible_simple_name_for_path(const AssetCatalogPath &path);