diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-19 17:55:46 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-19 17:55:46 +0300 |
commit | a7ade57e11113a74b11bd0330b073a252ad1c026 (patch) | |
tree | fbb970c90f2559c550016528cba0d1ee1bed0e12 /source/blender/blenkernel/intern/asset_library.cc | |
parent | 79a88b5e919d56b27e11cadb79ca30474c071af8 (diff) |
Asset Catalogs: allow creating catalog in unsaved blend file
Allow creating a new asset catalog in a yet-to-be-saved blend file. The
problem was caused by `AssetLibrary` not having an `AssetCatalogService`
right after creation; only after loading data from disk was this
instance created. It's now always there.
Diffstat (limited to 'source/blender/blenkernel/intern/asset_library.cc')
-rw-r--r-- | source/blender/blenkernel/intern/asset_library.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/asset_library.cc b/source/blender/blenkernel/intern/asset_library.cc index 48ace8efea1..32e7aab235d 100644 --- a/source/blender/blenkernel/intern/asset_library.cc +++ b/source/blender/blenkernel/intern/asset_library.cc @@ -102,6 +102,10 @@ void BKE_asset_library_refresh_catalog_simplename(struct AssetLibrary *asset_lib namespace blender::bke { +AssetLibrary::AssetLibrary() : catalog_service(std::make_unique<AssetCatalogService>()) +{ +} + AssetLibrary::~AssetLibrary() { if (on_save_callback_store_.func) { |