This will use the Factory supported class as a filter for assets in the Save Asset As dialog. Before this change anyone using this function would get a dialog that displayed all assets in the project.
This also makes it consistent with how Save Level As works, which only shows Levels in its dialog
#jira UE-178311
#rb lauren.barnes
#preflight 63fcbf93dd78dd50f68424b8
[CL 24423110 by thales sabino in ue5-main branch]
There is a host of functionality in the engine requiring looking up an AssetTypeAction object that best maps to a given class. The metric of 'best' is the AssetTypeAction whose SupportedClass is the closest to the given class in a hierarchy.
The existing implementation searches through all AssetTypeActions (at time of writing, > 200) and queries each for their SupportedClass and then chooses the one whose SupportedClass is closest to the given class.
The improvement here exploits that UClass is the type information of UObjects, and UObjects don't support multiple-inheritance (ie. only one SuperClass). Therefore we can walk the class hierarchy from the given Class up to find
the best AssetTypeAction. This changes the linear search (with # of AssetTypeActions) to a nominal sub-linear search (with depth of inheritance).
To be able to do that, a new map was added that associates a registered AssetTypeAction's SupportedClass with the AssetTypeAction's index in it's array. This lets us do a constant time lookup at the cost of a bit of memory.
There is further room for improvement with the usage of UFactory's public member functions such as `GetDisplayName`, `GetMenuCategories` and similar which still necessitates this query. Opportunity exists in the NewAssetContextMenu and in the API of IAssetTools::GetNewAssetFactories
to generate a more performance oriented data structure. There is also some opportunity to improve the construction of a FSoftClassPath from a UClass which can be fairly expensive. These all feed into the performance issue but ultimately this is the smallest change that provides the largest improvements at the lowest risk.
Testing:
Using debugger stepped through startup/shutdown of the editor.
Artificially added duplicate registrations to check codepaths for adding AssetTypeActions that with same supported class
Added unregisters to check codepaths for unregister. Need to be careful with editor as AssetTool module is removed very early on outside of the usual lifetime of modules in EngineLoop::Exit so most AssetTypeActions do not actually get deregistered.
#jira UE-175345
#rb ronald.koppers
#preflight 63ed3f277e76998e9a66a676
[CL 24253312 by logan buchy in ue5-main branch]
#rb dan.oconnor
#preflight 63d83f963656ea96dc2a0a4c
#jira UE-173747
"Crash occurs when scrolling down through files in Review Changelist window upon loading of asset"
- certain widget blueprints were crashing the review tool because we were working around the inability to diff against nullptr by constructing temprorary empty objects. This approach circumvents that problem entirely
#jira UE-173231
"Changelist Review tool allows diffing against previous revision for Deletion changes"
- while this jira suggests that the ability to diff deletion changes is a bug, it was actually an intended feature. The real bug was that it would crash or fail to work in many cases. This has been fixed by either asset diffing against nullptr or text diffing against an empty file (depending on circumstance)
#jira UE-174610
"Reviewing Changelist with Deletion Changes results in LogLinker warnings & LoadErrors"
- deletion changes were trying to load the new revision of files but obviously it doesn't exist because it's a deletion. Fixed by only loading the previous revision
note: since the review tool is going to be "Production Ready" in 5.2, these changes are neccesary for stability
[CL 23924072 by jordan hoffmann in ue5-main branch]
Also implement a pipeline asset name option so user can specify a name when they import only one asset.
#jira UE-173881
#rb jeanluc.corenthin
#rnx
#preflight 63cfe55f6730a500ffb0815e
[CL 23829783 by Alexis Matte in ue5-main branch]
AssetDefintiion - Converted more blueprint / Animation blueprint stuff over to be an asset definition.
#jira UE-165574
[CL 23804692 by nick darnell in ue5-main branch]
AssetDefinition - Working on the asset definitions for blueprints/class types, iterating on the Merge API. Bringing over more of the blueprint features into its asset definition, unregistered the Blueprint AssetType Actions.
Asset Filters - We now support categories per filter, this enables a single asset definition to correctly specify multiple filters. For example, blueprints actually supply 4 filters, one for blueprints, but also blueprint interfaces, macros and function libraries.
[CL 23791489 by nick darnell in ue5-main branch]
* Adds a new delegate for when AdvancedCopy is complete (since Advanced Copy is async and can't return the results directly)
* Adds a new blueprint callable overload for AdvancedCopy in the AssetTools interface that optionally takes this callback
[REVIEW] [at]matt.peters [at]brooke.hubert
[CL 23781823 by dj schilens in ue5-main branch]
AssetDefinition - Changing how getting the SourceFiles works a bit, wanted it to be easier to just get the real data and not have to wrap it myself, and also to not need to needlessly put it into a container if it's not needed.
#jira UE-165574
[CL 23686064 by nick darnell in ue5-main branch]
- Using Advanced Copy on assets with lots of dependencies spent most of the time just compiling the AR filter
- I kept the original IAssetRegistry::UseFilterToExcludeAssets() (using an FARFilter) as it is blueprint callable
[REVIEW] [at]*matt.peters [at]jay.nakai [at]brooke.hubert
[CL 23631854 by dj schilens in ue5-main branch]
The migration also now report in its callback the dependencies that where not exported because of the new filtering of the assets that can be migrated.
Fixed some other issues like a crash and a bad event broadcast.
#preflight 63bc235c763c6c10641898bb
#rb JeanLuc.Corenthin
[CL 23617167 by julien stjean in ue5-main branch]
The copying localization ID is now an option stated as such instead of a right click showing the ID you click. In order to show the ID the asset has to be loaded, so instead it's now a copy operation that then loads the asset before copying the ID.
Fixing a regression that stopped showing export options for unloaded assets. The code was using FastGetAsset, which won't load the asset if unloaded. The new code just looks at the package flags from the FAssetData, no need to attempt to load the asset.
#jira UE-165574
#jira UE-173203
[CL 23588044 by nick darnell in ue5-main branch]