Blender Git Loki

Git Commits -> Revision f9113c4

Revision f9113c4 by Sybren A. Stüvel (master)
October 18, 2021, 12:21 (GMT)
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

Commit Details:

Full Hash: f9113c4be836691ba599aab9b2f43e26333f8133
Parent Commit: 1f51037
Lines Changed: +388, -23

3 Added Paths:

/source/blender/blenkernel/intern/asset_library_service.cc (+136, -0) (View)
/source/blender/blenkernel/intern/asset_library_service.hh (+90, -0) (View)
/source/blender/blenkernel/intern/asset_library_service_test.cc (+101, -0) (View)

6 Modified Paths:

/source/blender/blenkernel/BKE_asset_library.h (+7, -2) (Diff)
/source/blender/blenkernel/BKE_asset_library.hh (+7, -1) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+3, -0) (Diff)
/source/blender/blenkernel/intern/asset_library.cc (+19, -10) (Diff)
/source/blender/blenkernel/intern/asset_library_test.cc (+23, -6) (Diff)
/source/blender/editors/space_file/filelist.c (+2, -4) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021