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]
[CrashFix] Removed invalid check()
- when I made assets diffable against null I must've missed this. Easy fix.
#jira none
#preflight trivial
#rb dan.oconnor
#lockout julien.marchand
[CL 24186475 by jordan hoffmann in ue5-main branch]
Moving an asset can replace the original asset with a redirector, so the source control system will consider the asset in the old location to be modified and the asset in the new location to be added.
#preflight 63e400085c0ce8f11b030df3
[CL 24090216 by stuart hill in ue5-main branch]
In addition, I refactored AssetViewUtils::SyncPathsFromSourceControl somewhat.
- Added alternative (preferred) way to get affected files/packages using the FSyncPreview operation as opposed to querying the AssetRegistry.
- Added support for hot reloading the world if one of its external packages (actor/object) got synced so those changes are reflected in the viewport.
- Added support for passing in either content paths or absolute paths to sync.
- Deprecated the 'bIsSyncLatestOperation' parameter from SyncPackagesFromSourceControl.
Note that SyncPackagesFromSourceControl now has a single internal caller (FAssetSourceControlContextMenuState::ExecuteSCCSync).
Note that SyncPathsFromSourceControl now has a single internal caller (FSourceControlWindows::SyncLatest).
[REVIEW]
#preflight 63e3a014244dc45a201c918d
[CL 24074948 by wouter burgers in ue5-main branch]
The following functions are new:
- ObjectPathToPathWithinPackage, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "MyAsset:SubObject.AnotherObject"
- ObjectPathToOuterPath, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "/Game/MyAsset.MyAsset:SubObject"
- ObjectPathToSubObjectPath, eg) "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "SubObject.AnotherObject"
The behavior of ObjectPathToObjectName has also been fixed to always return the leaf-most object name within the path (eg, "/Game/MyAsset.MyAsset:SubObject.AnotherObject" -> "AnotherObject"). Any code that relied on the old behavior should use ObjectPathToSubObjectPath instead.
#preflight 63e2677e1020773a3f32f55b
#rb Matt.Peters
[CL 24057677 by jamie dale 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]
Updated AssetTypeActivationOpenedMethod.h to include the generated.h.
#preflight 63d2beb85354589b5c70adb5
[CL 23871556 by bryan sefcik in ue5-main branch]
A scoped class is added to retain and restore all camera views which is used when we reload or sync packages.
#preflight 63d2766de55deff624ed1b5a
[CL 23867883 by stuart hill 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]
* Sync Latest no longer listing and reloading all packages when the source control provider provides a sync preview functionality. When a Sync Preview is available, Sync Latest unloads only the files that are going to be overwritten by the sync operation, and then reloads them and the world
* Refactored Revert All operation to improve performance
* Revert All no longer lists and reloads all packages when the source control provider provides a sync preview functionality. Instead it unloads only the files that may be overwritten by the revert operation (i.e. submittable files), and then reloads them and the world
* Replaced RevertAndReloadAllPackages with RevertAndReloadWorld, no longer listing and reloading all packages (see https://p4-swarm.epicgames.net/reviews/23244245/)
This review is a combination of the two archived reviews https://p4-swarm.epicgames.net/reviews/23736137 and https://p4-swarm.epicgames.net/reviews/23736282
#rb wouter.burgers, stuart.hill, brooke.hubert, francis.hurteau
#preflight 63c9c7786a00f3cc8ead6779
[CL 23796067 by marco anastasi 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]