UETOOL-332 - Collections 2.0
UETOOL-373 - Check robustness of Collections 2.0
The collection manager will now fix-up any references to redirectors within its collections once the asset registry has finished discovering all the available assets. It also adds a watcher so it can pick up any moves or deletes as they happen.
All of this fix-up is applied to the in-memory copy of the collection, and doesn't get persisted to disk until it needs to be (because referenced redirectors are being deleted). This helps to minimize issues with source control availability and shared/private collections.
This change also makes sure that objects that are being referenced by a collection will leave a redirector behind, and also adds some extra context (such as the collection name) to some of the source control errors that may be reported when saving a collection.
[CL 2602519 by Jamie Dale in Main branch]
UETOOL-332 - Collections 2.0
UETOOL-369 - Want nested collections with collapsing
We now have version 2 collections which maintain a persistent GUID for each collection. Existing collections will be lazily updated to this version when they need to be re-saved.
This GUID is used by child collections to keep track their parents, and the collections view (as well as the quick asset management) now show a tree of collections. Collections in the main collection view tree can be re-parented via drag and drop.
Performing Content Browser searches against a given collection will also test to see if an object exists in child collections, and the asset view will now show you folder entries for child collections when viewing a parent (if folders are enabled in your Content Browser view settings).
[CL 2593321 by Jamie Dale in Main branch]
The collections manager now stores a reverse look-up from the objects within its collections, to the collections that contain that object. This avoids the GetCollectionsContainingObject and GetCollectionsContainingObjects functions having to iterate the collections for each object queried, which can be a large win for large sets of objects.
This also adds some functions needed for the quick asset management feature.
[CL 2570748 by Jamie Dale in Main branch]
UETOOL-332 - Collections 2.0
Removed some duplicated data from FCollection (AssetList and AssetSet) as they had to be manually kept in sync. Only AssetSet exists now, and is converted into an array and sorted before being written to disk (to keep the order consistent for diffing). DiskAssetList has also been converted into a set (now DiskAssetSet) as this is only ever used for lookup queries.
All manually memory management has been removed from FCollectionManager, and the array of maps to collections has been converted into a single map using FCollectionNameType as its key. This simplifies collection lookup code in most cases, and removes the need to manually track the total number of collections outside of the map (NumCollections has now been removed).
Renamed ICollectionManager::GetCollectionsContainingAsset to ICollectionManager::GetCollectionsContainingObject as the function checks for any objects, not just assets.
Renamed FCollection::IsAssetInCollection to FCollection::IsObjectInCollection as the function checks for any objects, not just assets.
Made ICollectionManager::IsCollectionEmpty const.
Replaced all appropriate loop usage with range-based-for, and replaced any NULL with nullptr.
[CL 2560621 by Jamie Dale in Main branch]