From f9113c4be836691ba599aab9b2f43e26333f8133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 18 Oct 2021 12:33:53 +0200 Subject: Assets: add global `bke::AssetLibraryService` class Add `blender::bke::AssetLibraryService` class that acts like a blendfile-scoped singleton. It's allocated upon the first call to `BKE_asset_library_load` and destroyed in the LOAD-PRE handler. The `AssetLibraryService` ensures that edits to asset catalogs are not lost when the asset browser editor closes (or even reloads). Instead, the `AssetLibrary` pointers it owns are kept around as long as the blend file is open. Reviewed By: Severin Maniphest Tasks: T92151 Differential Revision: https://developer.blender.org/D12885 --- source/blender/blenkernel/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/CMakeLists.txt') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 47c1d698360..a86c6fbd3dd 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -90,6 +90,7 @@ set(SRC intern/asset_catalog.cc intern/asset_catalog_path.cc intern/asset_library.cc + intern/asset_library_service.cc intern/attribute.c intern/attribute_access.cc intern/attribute_math.cc @@ -472,6 +473,7 @@ set(SRC intern/CCGSubSurf_inline.h intern/CCGSubSurf_intern.h intern/attribute_access_intern.hh + intern/asset_library_service.hh intern/data_transfer_intern.h intern/lib_intern.h intern/multires_inline.h @@ -801,6 +803,7 @@ if(WITH_GTESTS) intern/armature_test.cc intern/asset_catalog_test.cc intern/asset_catalog_path_test.cc + intern/asset_library_service_test.cc intern/asset_library_test.cc intern/asset_test.cc intern/cryptomatte_test.cc -- cgit v1.2.3