Commit Graph

1180 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
josh adams
46a830d6b4 - Replacing many uses of LoadGlobalIniFile and LoadExternalIniFile with FCOnfigContext
#rb matt.peters
#p4v-preflight-copy 20293528
#preflight 629665d15238916c514359ad

[CL 20441581 by josh adams in ue5-main branch]
2022-05-31 16:25:06 -04:00
charles bloom
593fab6f69 Clamp F16 in valid range for BC6H in ISPC and ASTC, also set A to 1
even though ASTC could encode other values of A, still clamp as if it was BC6H for consistency
now all compressed HDR formats should clamp the same way that Oodle Texture currently does

#preflight 6296556c452ffe576a816993
#rb fabian.giesen

[CL 20440882 by charles bloom in ue5-main branch]
2022-05-31 15:49:40 -04:00
Lauren Barnes
89f3af884b Moving status bar styles to the core style location
#jira none
#rb trivial
#preflight 6294e4e63f154a84f7fb5b44

[CL 20435782 by Lauren Barnes in ue5-main branch]
2022-05-31 08:13:55 -04:00
tom noonan
4eb3de8fb6 Adding entries for CanContainVerse and VersePath to FNewPluginParams
#rb markus.breyer

#ROBOMERGE-AUTHOR: tom.noonan
#ROBOMERGE-SOURCE: CL 20390598 via CL 20391788 via CL 20391801 via CL 20391809
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20398472 by tom noonan in ue5-main branch]
2022-05-27 16:44:06 -04:00
matt johnson
cbc35e99ee MultiUserClient: reorder filtering predicates in package dirty callback to avoid unnecessary class loading
A recent change in World Partition added actor pinning during the save process to
try to ensure that those actors do not get unloaded after saving. This involves
dirtying the WorldFolders object that lives in the /Engine/Transient package and
ends up triggering another package dirty event that invokes
FConcertWorkspaceUI::OnMarkPackageDirty(). The dirtying of that package
should have been ignored for the purposes of Multi-User, but the call to
ShouldIgnorePackageDirtyEvent() to determine that came after the call
to HasLiveTransactionSupport(). The latter ends up reading class paths off
of the IncludeObjectClassFilters property of UConcertSyncConfig and then
attempts to load those classes using TryLoadClass(). This eventually invoked
a call to StaticFindObjectFast(), but since we are in the middle of a package
save at this point, we ended up triggering a fatal log message.

To address this, we simply perform the check to determine whether a package
dirty event should be ignored before we check whether there is live transaction
support for the package.

#jira UE-153112
#rb jason.walter
#preflight 62911f66a84d43e1a0bab136

[CL 20397436 by matt johnson in ue5-main branch]
2022-05-27 15:30:43 -04:00
Dominik Peacock
57b33a67e7 Add client browser similar to content browser
#jira UE-154034
#rb none
#preflight 6290b1b34f63120d8e1ef14e

[CL 20391802 by Dominik Peacock in ue5-main branch]
2022-05-27 07:56:59 -04:00
Dominik Peacock
a6706b1c11 Get message address for concert client
#jira none
#rb Jason.Walter
#preflight 628f85cd3437fe04a85b4ad9

[CL 20391242 by Dominik Peacock in ue5-main branch]
2022-05-27 05:38:22 -04:00
Dominik Peacock
4614b6e6b7 Extend ConcertUtil
#jira none
#rb Jason.Walter
#preflight 628f85a08c23e52ef0f401b7

[CL 20391238 by Dominik Peacock in ue5-main branch]
2022-05-27 05:37:19 -04:00
jason walter
06a627ac24 Add a CVar to delay timeout so that the transactions do not pile up if the user
is not interacting with the session.

#jira UE-153087
#rb none
#preflight 628fdd5ee73f637548ed67a1

[CL 20386028 by jason walter in ue5-main branch]
2022-05-26 17:18:58 -04:00
Leon Huang
19877e39c5 Fix for duplicate localization key warnings and missing localization defines/undefines in various files.
#rnx
#rb: Vincent.Gauthier
#jira: UE-151614
#preflight: 628fc4a98c23e52ef0fdfa7d

[CL 20384450 by Leon Huang in ue5-main branch]
2022-05-26 16:11:10 -04:00
matt johnson
140d39bab5 ConcertSyncClient: add a utility function for synchronizing the Asset Registry
This moves several private helper functions out of the ConcertSandboxPlatformFileUtils
namespace to instead be public in ConcertSyncClientUtil. It also adds a
SynchronizeAssetRegistry() function that takes the place of the IDirectoryWatcher::Tick()
call that was previously inserted into the sandbox discard process. This new function
can more readily be used elsewhere when file changes need to be applied immediately
in order to bring the Asset Registry up to date.

#jira UE-153112
#rb jason.walter
#preflight 628e6f44c511f67c9fd073a1

[CL 20373534 by matt johnson in ue5-main branch]
2022-05-25 19:38:48 -04:00
matt johnson
808c105021 ConcertSyncClient: do not reload the current level's package if it exists only in the discarded sandbox
When disconnecting from an MU session, destroying the client's package manager
would previously always reload the current level's package if that level used external
objects, since the external packages those objects are in may also have changed.
If the level itself was created while in the MU session though, the level's package
would only exist inside that session's sandbox, so leaving the session would destroy
the sandbox and purge that package, so there is no need to attempt to reload it.

#jira UE-153112
#rb jason.walter
#preflight 628c07343200b4415f36c805

[CL 20373280 by matt johnson in ue5-main branch]
2022-05-25 19:22:17 -04:00
Dominik Peacock
173610c4d2 Fix typo
#jira none
#rb none
#fyi Jason.Walter
#preflight skip

[CL 20370690 by Dominik Peacock in ue5-main branch]
2022-05-25 16:14:44 -04:00
Dominik Peacock
80d23194aa Add util function to find connected client info by EndpointId and minor clean up
#jira none
#rb Jason.Walter
#preflight 628e2ba8f622d972b585a782

[CL 20363483 by Dominik Peacock in ue5-main branch]
2022-05-25 09:29:34 -04:00
devin doucette
b2a07ea03e DDC: Merge from UE5/Main
#preflight 6288ff678828ea88c8af7034
#preflight 628ab5d93246d5019db76ed2
#rb none
#rnx

#ROBOMERGE-OWNER: devin.doucette
#ROBOMERGE-AUTHOR: Devin.Doucette
#ROBOMERGE-SOURCE: CL 20353148 via CL 20353832 via CL 20353839
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20355348 by devin doucette in ue5-main branch]
2022-05-24 16:40:25 -04:00
matt johnson
55f891fe86 ConcertSyncClient: do not mark temporary packages for reload when they are dirtied
Any temporary packages created while in an MU session will not exist on disk when
leaving that session and the sandbox is discarded, so they should not be reloaded.

This resolves an issue where if a world partition level is created and saved while in an
MU session, temporary packages for the external objects will be created and were
previously being marked dirty. When leaving the session, the package manager would
try and fail to reload all of those now defunct temporary packages and would issue an
error dialog about the failure.

#jira UE-153112
#rb jason.walter
#preflight 628c27ad3200b4415f3afbc1

[CL 20350731 by matt johnson in ue5-main branch]
2022-05-24 12:55:34 -04:00
charles bloom
dfd05f4f67 fix TextureFormatOodle error log was printing garbage
#rb none
#preflight none

[CL 20348260 by charles bloom in ue5-main branch]
2022-05-24 10:50:46 -04:00
charles bloom
3f13372f3b TextureFormatOodle nop just comment about bForceNoAlphaChannel behavior
#rb none
#preflight none

[CL 20330628 by charles bloom in ue5-main branch]
2022-05-23 12:36:46 -04:00
ionut matasaru
5181b5d9e3 [Insights] Added more "Insights/TraceDataFiltering" memory scopes in the TraceDataFiltering module (for untagged memory allocations while running in Editor). Also added "Insights" mem scope for allocs made from UnrealInsightsInterface module.
#jira UE-153277
#jira UE-153279
#rb Catalin.Dragoiu
#preflight 628b859e7c27b9caf1c68592

[CL 20325707 by ionut matasaru in ue5-main branch]
2022-05-23 09:17:10 -04:00
robert manuszewski
f8a812a32f Converting hardcoded short class/enum names to pathnames ahead of ANY_PACKAGE removal
#rb trivial
#jira UE-99463
#preflight 6288fd998828ea88c8aef3d0

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20314896 via CL 20314897 via CL 20314903 via CL 20314904
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20315214 by robert manuszewski in ue5-main branch]
2022-05-22 10:30:02 -04:00
matt johnson
54233371ee ConcertSyncClient: force sandbox file changes to be processed immediately when discarding the sandbox
This ensures that the Asset Registry is updated appropriately especially when files or
packages that exist only in the sandbox are deleted during a Multi-User session.

One problematic case was with the use of World Partition levels in a Multi-User session when
actors are added during the session, causing the creation of external packages that exist
only in the session's sandbox. When leaving the session, the sandbox is discarded and the
World Partition level is immediately reloaded. While the sandbox discard was properly
identifying the sandbox-only external packages and deleting them, and it was also registering
the file changes with the FDirectoryWatcherModule, doing so would only queue the file
changes as pending. Without an explicit call to IDirectoryWatcher::Tick(), the file deletes
would be processed *after* the World Partition level had already been reloaded, in which
case the Asset Registry is out of date and still contains a cached description of the added
actors. The actor's external package was indeed deleted from disk though, so the actor
would show as unloaded in the level when the level was reloaded. This could lead to situations
where the load state of the actor in World Partition gets out of sync with the level's list of
loaded actors, and a subsequent background search of the content directory could end up
clearing the stale entries at any time, either of which could potentially lead to crashes.

#jira UE-150626
#rb jason.walter
#preflight 62866ad8614041edb7089339

[CL 20287716 by matt johnson in ue5-main branch]
2022-05-19 17:19:11 -04:00
Jurre deBaare
33075008e4 NoPCH / NonUnity build fixes
#fyi Dominik.Peacock, graham.wihlidal
#preflight 6286713cf15d967ff4be69d8

[CL 20283635 by Jurre deBaare in ue5-main branch]
2022-05-19 13:46:50 -04:00
jason walter
2865317fac Fix unity compile error
#jira UE-153077
#fyi Dominik.Peacock
#rnx
#preflight none
#rb none

[CL 20282113 by jason walter in ue5-main branch]
2022-05-19 12:20:30 -04:00
Josh Adams
2d481d8077 - Fixed NonUnity error
#rb trivial
#preflight skip

[CL 20281733 by Josh Adams in ue5-main branch]
2022-05-19 11:57:36 -04:00