Commit Graph

75 Commits

Author SHA1 Message Date
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
richard malo
0c83b01d32 Fixed changelist data validation to check if external dependencies are at latest revision. If not, triggers an error for now as it's difficult to say if the changelist is valid or not.
#rb jeanfrancois.dube
#preflight 62910bda936293d61a819291

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 20397413 via CL 20397523 via CL 20397546
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20401185 by richard malo in ue5-main branch]
2022-05-27 19:29:34 -04:00
Sebastien Lussier
99351103ae DataValidationChangelist could miss some first level asset dependencies
* If an asset was already added as a dependency, then a later call to GatherDependencies with that asset would not have it's dependencies added
* Added check for missing dependencies not in source control
* Exclude script/memory packages from the processing
#rb luc.eygasier, julien.lheureux
#jira none
#preflight 628272c3734d0657702dcfc3

[CL 20226341 by Sebastien Lussier in ue5-main branch]
2022-05-16 12:27:17 -04:00
patrick enfedaque
ab359e9344 EditorValidatorSubsystem:
- ValidateOnSave doesn't load unloaded assets
- Pass in the ULevel::LoadAllExternalObjectsTag to GetAsset so that WP worlds get fully loaded for validation

#rb lauren.barnes
#preflight 627a6ca510766ef8c1f4d7c7

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 20123393 via CL 20123434 via CL 20123453
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20125212 by patrick enfedaque in ue5-main branch]
2022-05-10 13:07:13 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
Matt Peters
d64cf41728 AssetRegistry includes (Engine Plugins): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270563191629533ec2b6f6e

[CL 20017756 by Matt Peters in ue5-main branch]
2022-05-02 18:59:38 -04:00
JeanFrancois Dube
b173e05572 World Partition
- Refactored how the code handles disabling streaming so we can support multiple actor descriptor containers.
- Store if the partitioned level has streaming disabled in the asset registry tags so it can be queried without having the map loaded.
- Adapted changelist validation to query the disable streaming state for unloaded levels.

#rb richard.malo
#preflight 62434f7c323cb7b991f27214
#rnx

[CL 19555312 by JeanFrancois Dube in ue5-main branch]
2022-03-30 07:47:36 -04:00
jeanfrancois dube
95293c87ef World Partition Validation: better wording for actors referencing other actors in a different set of runtime data layers.
#rb none
#preflight none
#rnx

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 19493695 via CL 19493696 via CL 19493790
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19495139 by jeanfrancois dube in ue5-main branch]
2022-03-24 10:19:05 -04:00
richard malo
4103a6c827 - WorldPartition ActorDesc full support for actors referencing Data Layer Assets
- Fixed changelist validation on DataLayers using new WorldDataLayersActorDesc
#rb philippe.deseve, jeanfrancois.dube
#preflight 623b33e7db0f61c7926e7df8

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 19480678 via CL 19481445 via CL 19481573
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19484037 by richard malo in ue5-main branch]
2022-03-23 15:55:02 -04:00
evgenii babinets
51f1b7474c Add a parameter to DataValidation commandlet (e.g. AssetType=PhysicsAsset) to specify a subset of types to test.
#rb jordan.cristiano

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 19375523 via CL 19375528 via CL 19377042 via CL 19392319 via CL 19392489
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19402287 by evgenii babinets in ue5-main branch]
2022-03-16 03:03:50 -04:00
philippe deseve
8218e80ef1 UDataLayer deprecated in favor of UDataLayerInstance & UDataLayerAsset
UDeprecatedDataLayerInstance allows to boot level using deprecated UDataLayers
Worlds using DataLayer can run the DataLayerToAssetCommandlet to transition their existing DataLayers
FActorDataLayer interface is deprecated.
DataLayers Blueprint referencers should now use DataLayerAsset to retrieve DataLayerInstances.
DataLayer Code referencers should now use DataLayerAssets or DataLayerInstance FName to retrieve DataLayerInstances.
DataLayerLabels now only used for display/UI purpose
Relabeling DataLayers is not permitted anymore on new DataLayerInstances (allowed on UDeprecatedDataLayerInstance)
Added Changelist Validation for DataLayers
Added a column to the datalayer outliner showing any data layer errors.

#rb richard.mal jeanfrancois.dube
#preflight 623098c2050dc69468b6a297 (errors only related to lyra, which do not exist in this stream)

#ROBOMERGE-OWNER: philippe.deseve
#ROBOMERGE-AUTHOR: philippe.deseve
#ROBOMERGE-SOURCE: CL 19385808 via CL 19387392
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19389077 by philippe deseve in ue5-main branch]
2022-03-15 13:52:28 -04:00
Philippe DeSeve
7cd30ecbfa Hotfix: Remove ExternalActors & ExternalObjects from Folder Validation.
They cannot be loaded on the fly and spam the validation log with false positives.
UE-144978: A better alternative using WorldParitionErrorHandlers should used to perform the validation

#rb jeanfrancois.dube
#preflight 6227721be83598518f307b37

[CL 19302757 by Philippe DeSeve in ue5-main branch]
2022-03-08 10:24:18 -05:00
julien lheureux
aff31a95d8 Fixed duplicate localization key in data validator subsystem.
#jira UE-141504
#preflight 61fd6610163df1051e534da7
#lockdown aurel.cordonnier
#rb luc.eygasier
#rnx

#ROBOMERGE-AUTHOR: julien.lheureux
#ROBOMERGE-SOURCE: CL 18870299 in //UE5/Release-5.0/... via CL 18870796 via CL 18871143
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18871175 by julien lheureux in ue5-main branch]
2022-02-04 15:11:27 -05:00
dominic couture
68910a637b -Fix changelist validation in case of unloaded map , and correctly handle BluePrint Actor classes
-Add validation for same Runtime Grid in references
-Run validation iteratively until we've propagated all settings fixes (in case of long cycles, which shouldn't be a common case) but only report errors in the initial check (before propagating any fix) so that users only see errors for data they can view/fix.
-Changed validation for Attached actors, Attached actors validate their settings from the topmost parent so that we don't get multiple confusing errors and fixups

#rb jeanfrancois.dube
#preflight 61b11551ee6e47a827060112

#ROBOMERGE-AUTHOR: dominic.couture
#ROBOMERGE-SOURCE: CL 18412141 in //UE5/Release-5.0/... via CL 18412163
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18412185 by dominic couture in ue5-release-engine-test branch]
2021-12-08 16:19:35 -05:00
jeanfrancois dube
3f12778841 World Partition Grid Placement
- Deprecated enum EActorGridPlacement and replaced AActor::GridPlacement by bIsSpatiallyLoaded.
  - It makes more sense from a user perspective to set an actor as "non-spatially loaded" instead of "always loaded", especially with data layers.
  - If we ever need it, having the possibility to set actors to use their location or bounds to go in the grid will be a per-grid setting.

#rb richard.malo, sebastien.lussier
#preflight 61af8bf10e59fd0ab0f93cc4

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 18395825 in //UE5/Release-5.0/... via CL 18395836
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18395850 by jeanfrancois dube in ue5-release-engine-test branch]
2021-12-07 11:50:24 -05:00
dominic couture
9d919059e0 -WorldPartitionChangeListValidator
-When validating a CL with actors in a WorldPartition map, it locates and uses the ActorDescContainer for the map to do a validation of the Actors in the CL and inform the user of various errors. The same validation code is used in MapCheck.

#rb jeanfrancois.dube
#preflighted

#ROBOMERGE-AUTHOR: dominic.couture
#ROBOMERGE-SOURCE: CL 18355171 in //UE5/Release-5.0/... via CL 18355221
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18355229 by dominic couture in ue5-release-engine-test branch]
2021-12-02 14:14:51 -05:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00
luc eygasier
d96ea0b872 Fix abusive external dependencies validation error:
* Fixes Source Control cache corruption when submitting a changelist
* Updates external dependencies states when validating in case cached states are not valid anymore

#jira UE-132868
#rb Sebastien.Lussier

#changelist validated

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 18033926 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18033936 by luc eygasier in ue5-release-engine-test branch]
2021-11-03 10:43:41 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
luc eygasier
475beab2e6 * Adds Usecases to Editor Validators, allowing validators to specify for which usecase they should be executed by override
* Integrates TheCoalitation suggestion about FValidateAssetsResult struct, giving detailed information about the validated assets and results

Unshelved from pending changelist '17324854', review 17395959

#rb Francis.Hurteau
[FYI] Francis.Hurteau, JeanFrancois.Dube

#changelist validated

#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 17504846 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17504850 by luc eygasier in ue5-release-engine-test branch]
2021-09-14 10:41:49 -04:00
bob tellez
38ca7cd155 #UE Put editor validator loads in a editor-only serialization scope so the assets they reference are not cooked when stripping editor-only data
#jira nojira

#ROBOMERGE-SOURCE: CL 17298355 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17298374 by bob tellez in ue5-release-engine-test branch]
2021-08-24 23:46:09 -04:00
luc eygasier
654c821ef6 Adds DirtyFilesChangelistValidator to verify there is no unsaved modifications when submitting a changelist.
#rb JeanFrancois.Dube

#changelist validated

#ROBOMERGE-SOURCE: CL 17141167 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17141230 by luc eygasier in ue5-release-engine-test branch]
2021-08-11 15:42:15 -04:00
luc eygasier
9f354adce4 Use AssetRegistry to add writable files to Reconcile cache.
Adds UncontrolledChangelistValidator, reconciling writable assets, warning the user if new uncontrolled changes are found during changelist validation

#rb Sebastien.Lussier
#preflight 60d0965a367e6700013a0083

#changelist validated

#ROBOMERGE-SOURCE: CL 16728469 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16728483 by luc eygasier in ue5-release-engine-test branch]
2021-06-21 11:05:22 -04:00
julien lheureux
5eb62c7d76 Limit changelist data validation to direct dependencies only
#rb jean-francois.dube
#fyi jeff.farris

[CL 16062442 by julien lheureux in ue5-main branch]
2021-04-20 12:01:37 -04:00
louise rasmussen
825c64a6f5 Level Editor Menu Re-org, Part 1
#JIRA UETOOL-3039
#rb Lauren.Barnes
#lockdown Simon.Tourangeau
#preflight 606b8e0315d4190001b1698b

#ROBOMERGE-SOURCE: CL 15924633 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15924652 by louise rasmussen in ue5-main branch]
2021-04-05 19:11:24 -04:00