Blender Git Loki
Git Commits -> Revision 70aad5f
Revision 70aad5f by Sybren A. Stüvel (master) October 22, 2021, 14:31 (GMT) |
Asset Catalogs: support reloading without losing local changes Keep track of unsaved asset catalog changes, in a more granular way than just one boolean per asset library. Individual catalogs can now be marked with a flag `has_unsaved_changes`. This is taken into account when reloading data from the catalog definition file (CDF): - New catalog in CDF: gets loaded - Already-known catalog in CDF: - local unsaved changes: on-disk catalog is ignored - otherwise: on-disk catalog replaces in-memory one - Already-known catalog that does not exist in CDF: - local unsaved changes: catalog is kept around - otherwise: catalog is deleted. Because this saving-is-also-loading behaviour, the "has unsaved changes" flags are all stored in the undo buffer; undoing after saving will not change the CDF, but at least it'll undo the loading from disk, and it'll re-mark any changes as "not saved". Reviewed By: Severin Differential Revision: https://developer.blender.org/D12967 |
Commit Details:
Full Hash: 70aad5f498fcd7ed52f3422edda3021e5d4f9538
Parent Commit: 16ffa7b
Lines Changed: +324, -71
9 Modified Paths:
/source/blender/blenkernel/BKE_asset_catalog.hh (+54, -14) (Diff)
/source/blender/blenkernel/BKE_asset_library.hh (+3, -0) (Diff)
/source/blender/blenkernel/intern/asset_catalog.cc (+122, -34) (Diff)
/source/blender/blenkernel/intern/asset_catalog_test.cc (+107, -14) (Diff)
/source/blender/blenkernel/intern/asset_library.cc (+5, -0) (Diff)
/source/blender/blenkernel/intern/asset_library_service.cc (+3, -1) (Diff)
/source/blender/blenkernel/intern/asset_library_service_test.cc (+15, -3) (Diff)
/source/blender/editors/asset/intern/asset_catalog.cc (+9, -4) (Diff)
/source/blender/editors/space_file/asset_catalog_tree_view.cc (+6, -1) (Diff)
/source/blender/blenkernel/BKE_asset_library.hh (+3, -0) (Diff)
/source/blender/blenkernel/intern/asset_catalog.cc (+122, -34) (Diff)
/source/blender/blenkernel/intern/asset_catalog_test.cc (+107, -14) (Diff)
/source/blender/blenkernel/intern/asset_library.cc (+5, -0) (Diff)
/source/blender/blenkernel/intern/asset_library_service.cc (+3, -1) (Diff)
/source/blender/blenkernel/intern/asset_library_service_test.cc (+15, -3) (Diff)
/source/blender/editors/asset/intern/asset_catalog.cc (+9, -4) (Diff)
/source/blender/editors/space_file/asset_catalog_tree_view.cc (+6, -1) (Diff)