Commit Graph

758 Commits

Author SHA1 Message Date
jordan hoffmann
5abf21121d [BugFix] Modified actors are not diff'ing correctly with one file per actor
#rb dan.oconnor
#rb francis.hurteau

[CL 24451087 by jordan hoffmann in ue5-main branch]
2023-02-28 16:07:32 -05:00
thales sabino
9df15b4889 Set the asset filter in UAssetToolsImpl::CreateAssetWithDialog
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]
2023-02-27 09:48:56 -05:00
wouter burgers
8ff2c6c41f SourceControl: Add start/finish delegates to AssetViewUtils sync operations.
[REVIEW] [at]dave.belanger, [at]manuel.lang, [at]brooke.hubert
#preflight none

#localization none
#tests manual

[CL 24412834 by wouter burgers in ue5-main branch]
2023-02-24 19:03:48 -05:00
logan buchy
fe50d097d6 Performance improvement to opening Context Menu and other operations looking up AssetTypeActions
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]
2023-02-16 04:12:20 -05:00
jordan hoffmann
31d4eed6e5 Unshelved from pending changelist '24180955':
[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]
2023-02-13 15:23:03 -05:00
stuart hill
60cdf1962c When moving an asset to a different folder in the Editor, do not show the "Check Out Assets" dialog if the Automatically Checkout on Asset Modification option is selected.
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]
2023-02-08 22:01:06 -05:00
wouter burgers
0aa122ff5c SourceControl: Added notification if sync fails when getting latest, similar to the warning shown by FSourceControlWindows::PromptForCheckin for checkin fails.
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]
2023-02-08 12:17:26 -05:00
jamie dale
5fa5b98920 Added additional FPackageName::ObjectPathToX functions
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]
2023-02-07 15:29:21 -05:00
alexis matte
a20c1131ce Change asset tools import extension support to FNamePermissionList instead of FString. This allow to control the permissions like all the other permission.
#rb jeanluc.corenthin
#preflight 63e24fad07207b2570b72285

[CL 24049361 by alexis matte in ue5-main branch]
2023-02-07 10:49:14 -05:00
jordan hoffmann
bdc51e576e [BugFix] Static Analysis warnings
#rb dan.oconnor
#lockdown julien.marchand
#preflight 63db064f4965eb8c33de5daf

[CL 23972790 by jordan hoffmann in ue5-main branch]
2023-02-02 13:26:22 -05:00
wouter burgers
192829d351 SourceControl: Refactored UsesCustomProjectDir / GetSourceControlLocations usage pattern.
[CL 23965223 by wouter burgers in ue5-main branch]
2023-02-02 03:44:18 -05:00
shirley man
34519468d3 #preflight 63db295b39234ef628432297
#rb trivial
Fixed spelling typo in log message.

[CL 23964736 by shirley man in ue5-main branch]
2023-02-02 01:25:57 -05:00
jordan hoffmann
31b04b24ba [Feature/Bugfix] Support for diffing against nullptr (treated as an empty or nonexistent file)
#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]
2023-01-31 01:28:46 -05:00
alexis matte
b93fee971d Create a system to control which extension importer should support.
#rb jeanluc.corenthin
#rnx
#preflight 63d7eb4cba4fadeef006c7d7

[CL 23923306 by alexis matte in ue5-main branch]
2023-01-31 01:12:25 -05:00
alexis matte
b1473700b2 Add Import allowed asset types in the class path permission system.
#rb jeanluc.corenthin , jason.stasik
#rnx
#preflight 63d4292bbe1970f882362f3a

[CL 23895914 by alexis matte in ue5-main branch]
2023-01-27 19:26:17 -05:00
bryan sefcik
5798c36ed1 Added a missing circular dependency with AssetTools and UnrealEd.
Updated AssetTypeActivationOpenedMethod.h to include the generated.h.
#preflight 63d2beb85354589b5c70adb5

[CL 23871556 by bryan sefcik in ue5-main branch]
2023-01-26 13:19:09 -05:00
stuart hill
df6df596f7 Ensure the camera does not reset when we are syncing or reverting a file or all files via source control
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]
2023-01-26 10:15:04 -05:00
johan duparc
83548e6f86 Fix typo in asset tools category
[CL 23845882 by johan duparc in ue5-main branch]
2023-01-25 06:01:10 -05:00
Alexis Matte
c780cd0119 Interchange: Integrate interchange with the AssetImportTask workflow, by allowing user to specify an override pipeline stack in the AssetImportTask::Options parameter.
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]
2023-01-24 09:17:49 -05:00
nick darnell
1d16e1bb1c AssetDefinition - Fixing AssetDefintions for native classes not existing.
#jira UE-165574

[CL 23824481 by nick darnell in ue5-main branch]
2023-01-23 18:48:51 -05:00
marco anastasi
96fdec112c Fixed: SkeinUE does not sync latest if only non-package files have changed
[REVIEW] [at]manuel.lang, [at]wouter.burgers

[CL 23821510 by marco anastasi in ue5-main branch]
2023-01-23 16:16:19 -05:00
nick darnell
e6dc94a38f AssetDefinition - Fixing filter categories to include everything that hasn't yet been converted to a Asset Definition.
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]
2023-01-21 21:00:48 -05:00
marco anastasi
b29f599449 * Refactored Sync Latest operation to improve performance
* 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]
2023-01-20 15:31:16 -05:00
nick darnell
496d9a03a6 AssetDefinitions - Removing files I missed.
[CL 23791514 by nick darnell in ue5-main branch]
2023-01-20 11:50:17 -05:00
nick darnell
58645cbc15 Editor Performance - Fixing a long standing issue with asset thumbnails, they've been loading the assets for a pretty long time now, because of the thumbnail editing mode. Note that thumbnail editing mode was not needed to be enabled and yet the asset would still load. This was a cause for a lot of hitches in the Content Browser.
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]
2023-01-20 11:49:23 -05:00