UE-18771 - Collections log spam when building engine dlls that live in the same directory as a running instance of the editor
The collection manager now ensures that the collection directories exist on disk before it starts watching them, and will also ignore the "system" collection directory (as that is blank and was causing it to watch for changes in the Binaries folder).
As a belt-and-braces measure, FCollectionManager::TickFileCache will also now ensure that a file ends with the ".collection" extension before attempting to process the file as a collection.
[CL 2627607 by Jamie Dale in Main branch]
UETOOL-332 - Collections 2.0
UETOOL-401 - Add support for dynamic collections
You can now reference both static and dynamic collections in the Content Browser text filter, including recursive references (the evaluator guards against cyclic collection references).
The text filter now recursively gathers up any dynamic collection references when the filter text is changed. These are then tested depth first as sub-expressions against each object, to see whether the object is "contained" within the given dynamic collection.
[CL 2615416 by Jamie Dale in Main branch]
UETOOL-332 - Collections 2.0
UETOOL-401 - Add support for dynamic collections
These collections can be created from a text search in the Content Browser, and allow you to store a search query so it can be reused or shared.
They have some limitations compared to static collections:
- As they never know what objects they actually contain, they can't be displayed in the "Collections" list in asset tooltips.
- They cannot contain child collections.
[CL 2615029 by Jamie Dale in Main branch]
UE-17782 - Editor must be restarted for New Collections to appear after syncing
These use FFileCache to avoid detecting changes that are made by the collection manager itself.
This also fixes some issues when merging collection sets together, and fixes some places where UI wouldn't update when a collection was changed due to an update or merge.
[CL 2612319 by Jamie Dale in Main branch]
This used to maintain an up-to-date cache as soon as a change happened. This lead to extra complexity in some cases, and often would keep caches up-to-date that weren't currently even being used.
Adding, removing, or updating a collection will now just mark the relevant parts of the cache as dirty so that they can be updated (using a well defined, safe, full update) the next time something requests them.
[CL 2610959 by Jamie Dale in Main branch]
This shows a little colored pip to the right of the collection items, where each color means:
Grey - Up-to-date and empty
Green - Up-to-date and not empty
Blue - Has local changes
Orange - Not at the latest revision
Red - Checked out by another user, in a conflicted state, or missing its source control provider
This also adds an "Update" and "Save" option to the collections context menu. Typically these won't be needed as collections mostly manage themselves, but since we now show when a collection is out-of-date or dirty, it makes sense to allow the user to take action to correct these states without having to leave the editor.
[CL 2610477 by Jamie Dale in Main branch]
UE-17561 - Collections allow for several special characters that are not normally allowed
UE-17549 - User gets no warning for invalid Characters when naming a Collection
UE-17538 - Add a Character limit for naming a collection
The list of valid characters now matches that of assets and folders in the Content Browser, and the user is informed when they try and use an invalid character.
The collection name is also now restricted to NAME_SIZE to avoid a crash if a user entered a name that was too long.
[CL 2609261 by Jamie Dale in Main branch]
UE-17678 - Limit what type of collections can be nested
Local collections can now only contain other local collections.
Private collections can now only contain local or private collections.
Shared collections can still contain any other kind of collection.
[CL 2607624 by Jamie Dale in Main branch]
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]