Commit Graph

327 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
lauren barnes
4b82e918fa Replacing legacy EditorStyle calls with AppStyle
#rb header and class name replacement

#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20078276 via CL 20078825
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20106316 by lauren barnes in ue5-main branch]
2022-05-09 13:51:26 -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
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
Matt Peters
e6c9db19fb EditorDomain saving and UWorld: Add a tag that informs editor domain saves to keep the UWorld initialized, because UEditorEngine::Map_Load requires that it either be not-yet-initialized or that it is still fully initialized.
#rb Patrick.Enfedaque
#rnx
#preflight 626bdd5044703e0a24bf0123

[CL 19977055 by Matt Peters in ue5-main branch]
2022-04-29 08:53:53 -04:00
Patrick Enfedaque
41059f0042 World: Allow Subsystem initialization on EWorldType::Inactive
-  UWorldSubsystem::DoesSupportWorldType still doesn't support EWorldType::Inactive so behavior remains unchanged
-  WorldPartitionCookPackageSplitter now initializes the world if it isn't already so that UDataLayerSubsystem is initialized at cook time
-  Remove remaining code path where same world could be reused if it was initialized as inactive (Opening unsaved new level in content browser will now require saving first)

#jira none
#rb richard.malo, jeanfrancois.dube
#preflight 62669d3a0634d0904cdba283
#test CitySample, AncientWorld

[CL 19917858 by Patrick Enfedaque in ue5-main branch]
2022-04-26 07:05:21 -04:00
Matt Peters
c1b46b1fed FAssetData: Callsites need to handle AssetData.GetClass() returning null. Added IsInstanceOf(UClass*) for the common operation GetClass() && GetClass->IsChildOf(BaseClass).
#jira UE-146521
#rb Zousar.Shaker
#rnx
#preflight 623874b789625f06129e466b

[CL 19450936 by Matt Peters in ue5-main branch]
2022-03-21 09:00:36 -04:00
leon huang
0193ffe8d3 Fix for CIS warnings for localization duplicate keys. Fixes simply involve changing one of the colliding localization keys.
#rnx
	#rb: Vincent.Gauthier
	#jira: UE-143620
	#preflight: 6222489d2f7d78332e121416
	#lockdown Mitchell.Wilson

#ROBOMERGE-AUTHOR: leon.huang
#ROBOMERGE-SOURCE: CL 19272838 in //UE5/Release-5.0/... via CL 19273134
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19275063 by leon huang in ue5-main branch]
2022-03-04 16:10:23 -05:00
sebastian nordgren
ac6bec390c "testprops generator" command added to test property generator.
"testprops struct=StructName" parsing added to use a specific struct, much like a specific class can be specified.

Added various test cases to PropertyEditorTestObject.

#rb paul.chipchase
#preflight 6217694822019f882b47acf3

[CL 19111936 by sebastian nordgren in ue5-main branch]
2022-02-24 06:26:27 -05:00
Robert Manuszewski
0806c88f60 Terminating PIE will no longer assert when PendingKill is disabled and level leaks are detected. Added an ensure when reporting level leaks through UEngine::FindAndPrintStaleReferencesToObject() with PendingKill disabled.
#preflight 62066f7754003c49ad37ea0a
#rb Markus.Breyer

[CL 18951753 by Robert Manuszewski in ue5-main branch]
2022-02-11 09:28:34 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
marc audy
6553e6cd0a Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)
#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
2022-01-24 15:07:48 -05:00
patrick enfedaque
cb8b7ab873 New Empty map -> Deactivates all Editor modes (same as New map from template)
#rb sebastien.lussier
#preflight skip

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 18576507 in //UE5/Release-5.0/... via CL 18576515
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18576521 by patrick enfedaque in ue5-release-engine-test branch]
2022-01-11 15:54:02 -05:00
jeanfrancois dube
983e0f49de Don't reinitialize world subsystems when doing a map rebuild as we don't uninitialize them anymore.
This is essentially a backout of 11776301 which was invalidated by 13063957.

#jira UE-110651

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 18443649 in //UE5/Release-5.0/... via CL 18445105
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18445269 by jeanfrancois dube in ue5-release-engine-test branch]
2021-12-13 13:35:56 -05:00
julien stjean
ea5951bfab Fixed some notification issues with the type element selection set.
The mecanism to select something wihtout emiting a notification was clearing the existing pending notifications and it wasn't interacting properly with the old bacth notification system.

Also fixed a batch selection notification issue when unselecting all the selected actors from the scene outliner.

#rb Jamie.Dale
#preflight 61b3732fee0de9822e452275

#ROBOMERGE-AUTHOR: julien.stjean
#ROBOMERGE-SOURCE: CL 18436445 in //UE5/Release-5.0/... via CL 18437432
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18437918 by julien stjean in ue5-release-engine-test branch]
2021-12-10 21:24:55 -05:00
jon nabozny
478624e161 World Partition Editor QoL: automatically load surrounding editor cells when using the BugItGo command.
Disabled by default, can be enabled by setting the value in the World Partition Editor (saved in per-user settings).
Loading range can be tweaked via wp.Editor.LoadingRangeBugItGo cvar (defaults to 128M).

#rb patrick.enfedaque
#preflight 613a0753f9a5220001408dd9

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 17471905 via CL 17925816 via CL 18361748 via CL 18361776
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18361837 by jon nabozny in ue5-release-engine-test branch]
2021-12-02 18:42:47 -05:00
jeanfrancois dube
eaf139023e World Partition Streaming Generation:
- Added IStreamingGenerationErrorHandler interface to handle world partition streaming generation errors.
  - Implemented FStreamingGenerationLogErrorHandler error handler that logs errors to the console.
  - Implemented FStreamingGenerationMapCheckErrorHandler error handle that logs errors to the map check window.
- Moved all map checks code from runtime hash to streaming generation code using new interface.

#rb richard.malo
#preflight 61a5043ad87e4a573f4cd041

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

[CL 18311993 by jeanfrancois dube in ue5-release-engine-test branch]
2021-11-29 12:28:52 -05:00
matt peters
e2962f88c9 SavePackage: Deprecate Conform and DiffMap arguments, and change the interface to use a FSavePackageArgs struct instead of a large number of separate arguments.
#rb Francis.Hurteau
[RN] Core, Minor

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 18279152 in //UE5/Release-5.0/... via CL 18279174
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18279186 by matt peters in ue5-release-engine-test branch]
2021-11-23 20:56:06 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -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
patrick enfedaque
209be396b4 World Partition:
- New Level Dialog: Empty Open World Template
- Remove IsWorldPartitionEnabled project setting

#rb jeanfrancois.dube, richard.malo
#preflight 615477fc03f3320001fefe99

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 17663222 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17663241 by patrick enfedaque in ue5-release-engine-test branch]
2021-09-29 12:29:37 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
jason walter
f2d53c56ab Use MakeDialogDelayed vs MakeDialog in some of the Save / Load paths. This will prevent the UI from disrupting workflows when in Multi-user mode.
#jira UE-124537
#rb jamie.dale

#ushell-cherrypick of 17407178 by jason.walter

#ROBOMERGE-AUTHOR: jason.walter
#ROBOMERGE-SOURCE: CL 17573843 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17573844 by jason walter in ue5-release-engine-test branch]
2021-09-20 14:51:48 -04:00
paul chipchase
ecdec9bf35 Add an UE5 specific version EUnrealEngineObjectUE5Version to be used for global changes instead of EUnrealEngineObjectUEVersion. By splitting and storing both version numbers we allow for hypothetical future UE4 changes that will not conflict when merged to UE5.
#rb CarlMagnus.Nordin
#rnx
#tests Ran overnight preflights on several platforms, opened/cooked/staged/ran the oldest version of InfiltratorDemo that can be downloaded (4.11)

### ObjectVersion
- Add a new version enum EUnrealEngineObjectUE5Version.
-- This version number starts at 1000 which leaves more than enough for for EUnrealEngineObjectUEVersion to be expanded
- Even though very few changes (if any at all) to EUnrealEngineObjectUE4Version are expected there is a static assert to make sure that EUnrealEngineObjectUEVersion::AUTOMATIC_VERSION never overtakes EUnrealEngineObjectUE5Version::INITIAL_VERSION.
- Add a struct FPackageFileVersion that wraps around the version numbers and is used to store them instead of raw int32 values which was done before. This should make it easier to add new version numbers in the future if we desire (although this will cause problems in places that serialize the struct directly)

### FPackageFileSummary
- Adding a new entry to CurrentLegacyFileVersion at value -8 which shows the UE5 version being added. This lets us make the changes without needing to submit anything to UE4 Main.
- When loading a package that does not have a UE5 version, it will remain at 0.
- Added ::IsFileVersionTooOld and ::IsFileVersionTooNew to replace hardcoded tests in the code base for version validity. This will make it easier to make changes in the future.
- A few months ago most of the accessors of the version number were deprecated in favour of a version that did not contain the Engine number (ie UE4Ver -> UEVer in Archive) but to work with these changes the renamed methods now will return or accept the version as FPackageFileVersion rather than int32.  The old UE4 methods will remain deprecated and direct licensees to use the new methods.

### Archive
- Now stores the version as a FPackageFileVersion rather than int32

### LinkerLoad
- Reports the larger version number if we detect a higher version number than we support. Note that this could cause an issue if the UE4 version is ever raised but helps keep the code simple.

### AssetData
- Need to add a new version here to manage existing data that only has the UE4 version

### EditorDomain
- We do not need to version the format, we can just invalidate existing editor domain entries via EditorDomainVersion

### EditorServer
- When reporting that a package is too old we report the UE4 version as that is the only version that can be older than VER_UE4_OLDEST_LOADABLE_PACKAGE
- When reporting that a package is too new it can be either the UE4 or the UE5 version so we print them together "UE4Ver|UE5Ver"

### ContentCommandlets
- The min and max resave versions have been kept as a single value, you will not be able to resave against different UE4 and UE5 versions at the same time. It doesn't seem like a useful feature and would greatly increase the complexity of the code.
- We will also only report the file version as a single value.

### ManifestUObject
- This class was setting an older obsolete version on purpose to try and maintain compatibility with older clients so we need to provide a way to create an older UE4 only version that will leave the UE5 version as unset.

### NetworkPlatformFile
- I was unable to test the code path in FNetworkPlatformFile::ProcessServerCachedFilesResponse as I am unsure how to run the game in a mode that will actually use it.
- When reading an older "CookedVersion.txt" that was saved with a single version, the reads will fail and this will count as a version change in the code so that all of the existing files will be deleted. The existing code would not give the user a log message when this happens and given the very small time window where this might happen caused by this change I have opted to leave this alone and not add any additional logging.
- If we do detect a version mismatch we will still only log the version number as a single version.

### CookOnTheFlyServer
- We now add each version number to the IniVersionMap rather than merge the version and license version as a key/value pair. This allows us to a) use both the UE4 and UE5 version numbers b) we now log a warning that the version values don't match when it is changed, previously since it was a key value we would log a warning about an additional setting instead.
-- I also added "vs" to the log message when values are mismatched to make the space between the two values being printed clearer.

#ROBOMERGE-OWNER: paul.chipchase
#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17549459 via CL 17550236 via CL 17550238 via CL 17550582
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v870-17433530)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17550583 by paul chipchase in ue5-release-engine-test branch]
2021-09-17 07:04:55 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00