Commit Graph

43 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
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
Richard Malo
223c790fef ActorFolder Improvements :
- Optimized FFolder resolving to UActorFolder : now uses and maintains an acceleration table
- Favor creation of FFolder using ActorFolderGuid when available
- FFolder creation now always passes a Root Object to facilitate Root Object ptr resolving (even when it's the main world)
- Fixed Duplicate Hierarchy when using Actor Folders and target level is different
- Fixed copy/paste actor from Persistent to LevelInstance not loosing actor folder
- Fixed mark for delete of an Actor Folder that could generate duplicates
- Modified fix of duplicate Actor Folders in a level : instead of renaming duplicates, mark for delete all duplicates except one and redirect children to the one we keep

#jira UE-150566
#rb patrick.enfedaque, jeanfrancois.dube
#preflight 6284101f486700b561a555ff

[CL 20346124 by Richard Malo in ue5-main branch]
2022-05-24 06:58:06 -04:00
JeanFrancois Dube
285e40444b Data Layers: replaced FScopedDataLayerTransaction by FScopedTransaction.
#rb richard.malo
#preflight 62824179c57a894cf66e3541
#rnx

[CL 20222410 by JeanFrancois Dube in ue5-main branch]
2022-05-16 08:48:27 -04:00
richard malo
879c5c42c6 Added support of Data Layers inside Level Instances.
#rb jeanfrancois.dube, patrick.enfedaque, philippe.deseve
#jira UE-151266
#preflight 62796854a35fb5cb3f55e9e6

#ROBOMERGE-OWNER: richard.malo
#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 20121141 via CL 20121608 via CL 20121618
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20122781 by richard malo in ue5-main branch]
2022-05-10 10:22:54 -04:00
vincent beauchemin
ca3f1f20f9 DataLayer - Fix Duplicated keys for localization
#jira UE-150820 - UE5/Release-5.1 - Duplicated keys for localization - UE - LD & Art
#rb phiippel.deseve
#preflight skip
#rnx

[CL 20075312 by vincent beauchemin in ue5-main branch]
2022-05-06 10:22:04 -04:00
philippe deseve
ed0f48629d DataLayer API to go through DataLayerSubsystem instead of AWorlDataLayers
Move DataLayers' EditorWorldSetting logic from DataLayerEditorSubsystem & WorldDataLayers to DataLayerSubsystem
Use DataLayerInstance::GetOuterWorldDataLayers instead of retrieving the WorldDataLayers from UWorld::GetWorldDataLayers instead
Rename UDataLayerSubsystem::GetDataLayerFromAsset to GetDataLayerInstanceFromAsset to be inline with the rest of the API
Preparation for multiple AWorldDataLayers existing in the same world

#rb richard.malo
#test PIE, SIE, -game, Editing flow, cooked game, Hlods generation
#preflight 627402a0ca0ad32a968422af

#ROBOMERGE-AUTHOR: philippe.deseve
#ROBOMERGE-SOURCE: CL 20060072 via CL 20060595 via CL 20060607
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20062765 by philippe deseve in ue5-main branch]
2022-05-05 15:15:33 -04:00
philippe deseve
d05121f9b1 Undo 19721428
Access to WorldSubsystems at cook time are causing crashes

#rb richard.malo
#jira UE-148953 UE-148946
#preflight 62572be3d606fd159e9e67e0

#ROBOMERGE-OWNER: zousar.shaker
#ROBOMERGE-AUTHOR: philippe.deseve
#ROBOMERGE-COMMAND: _robomerge[bot4] UE5-MAIN
#ROBOMERGE-SOURCE: CL 19745482 via CL 19747379 via CL 19747391
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19751374 by philippe deseve in ue5-main branch]
2022-04-14 00:26:55 -04:00
philippe deseve
83be8e37a1 DataLayer API to go through DataLayerSubsystem instead of AWorlDataLayers
Move DataLayers' EditorWorldSetting logic from DataLayerEditorSubsystem & WorldDataLayers to DataLayerSubsystem
Use DataLayerInstance::GetOuterWorldDataLayers instead of retrieving the WorldDataLayers from UWorld::GetWorldDataLayers instead
Rename UDataLayerSubsystem::GetDataLayerFromAsset to GetDataLayerInstanceFromAsset to be inline with the rest of the API
Preparation for multiple AWorldDataLayers existing in the same world

#rb richard.malo
#preflight 6255924fcd5ed4dd0916d8e5

#ROBOMERGE-AUTHOR: philippe.deseve
#ROBOMERGE-SOURCE: CL 19721428 via CL 19721841 via CL 19722491
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19725557 by philippe deseve in ue5-main branch]
2022-04-12 14:08:25 -04:00
Dominic Couture
e09ebc1632 -Unregister context menu when FDataLayerMode is destroyed since the context menu uses lambdas that capture the FDataLayerMode instance and doesn't get recreated unless unregistered.
#jira UE-147799
#rb philippe.deseve
#preflight 62470cb9df7d23dbfe1b9976

[CL 19588610 by Dominic Couture in ue5-main branch]
2022-04-01 10:54:07 -04:00
philippe deseve
8693be32cb Added a FDataLayerCreationParameters struct to supply data layer instance creation with more parameters
CreateDataLayer is now deprecated and CreateDataLayerInstance should be used
Move Data Layer Asset selection code from DataLayerEditorSubsystem to DataLayerMode

#rb richard.malo
#preflight 62460e139f40423414647139

#ROBOMERGE-AUTHOR: philippe.deseve
#ROBOMERGE-SOURCE: CL 19578153 via CL 19578237 via CL 19578261
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19579567 by philippe deseve in ue5-main branch]
2022-03-31 17:43:23 -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
Richard Malo
296dd8a20c - Actor Editor Context : System can register themselves to the ActorEditorContextSubsystem and provide the necessary to apply their context value to newly created actors and optionally show a widget in the viewport.
- Refactored viewport's current level combobox and added "current data layers" in data layer outliner and "current folder" in world outliner to use this system.
- Can optionally be hidden from viewport using advanced flag in ULevelEditorViewportSettings.
#robomerge FNNC
#rb patrick.enfedaque
#preflight 6227604a7077eb04cf696c33

[CL 19302351 by Richard Malo in ue5-main branch]
2022-03-08 09:40:27 -05: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
vincent beauchemin
00965af9e8 Add feature to move actors from data layer(s) to another data layer in the Data Layers Outliner
* This is perform on Left Alt down.
* Mouse cursor is changed during the operation.
* SceneOutliner CreateDragDropOperation has now info on FPointerEvent.

#rb richard.malo
#preflight 620d2bb501253d2e19175c1c

[CL 19016197 by vincent beauchemin in ue5-main branch]
2022-02-16 11:58:08 -05:00
richard malo
69aaebf0c8 Moved the "Allow Runtime Data Layer Editing" flag from the EditorPerProjectUserSettings to the AWorrldDataLayers actor so that the state persists for all users.
#rb jeanfrancois.dube
#jira UE-136091
#preflight 61a11845664cbb92c762f1f9

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 18301366 in //UE5/Release-5.0/... via CL 18301372
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18301375 by richard malo in ue5-release-engine-test branch]
2021-11-26 14:01:04 -05:00
richard malo
0a5cd75ed9 - Added Data Layer highlighting based on editor selection
- Added Data Layer / Actor filtering based on editor selection
#jira UE-135846
#jira UE-135848
#rb patrick.enfedaque
#preflight 619fb87647752856c9ab1b76

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 18296131 in //UE5/Release-5.0/... via CL 18296191
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18296199 by richard malo in ue5-release-engine-test branch]
2021-11-25 13:51:47 -05:00
richard malo
41b81f0c91 Added support for Level Instances to have a folder hierarchy in the World Outliner. Actor Folders can now have a root object which serves as a context for folder hierarchy.
#jira UE-134605
#rb patrick.enfedaque
#preflight 619d3a42cb49ea94934aa11d

#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 18273663 in //UE5/Release-5.0/... via CL 18273683
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18273700 by richard malo in ue5-release-engine-test branch]
2021-11-23 14:43:39 -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
jeanfrancois dube
7fe5b90cfa [Backout] - CL17268172
[FYI] JeanFrancois.Dube
Original CL Desc
-----------------------------------------------------------------
AActor::IsValidForDataLayer now calls AActor::SupportsDataLayer, and AActor::SupportsDataLayer is now private.

#rb richard.malo
#preflight 6123b8e476f1fd0001071f89

#ROBOMERGE-SOURCE: CL 17296742 via CL 17297606
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17297801 by jeanfrancois dube in ue5-release-engine-test branch]
2021-08-24 22:10:10 -04:00
jeanfrancois dube
cfd3d2df88 AActor::IsValidForDataLayer now calls AActor::SupportsDataLayer, and AActor::SupportsDataLayer is now private.
#rb richard.malo
#preflight 6123b8e476f1fd0001071f89

#ROBOMERGE-SOURCE: CL 17268172 via CL 17273331
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218)

[CL 17274366 by jeanfrancois dube in ue5-release-engine-test branch]
2021-08-23 15:24:48 -04:00
patrick enfedaque
b199198597 DataLayer: Allow default editor load state to be unloaded + Resetting user settings
#rb richard.malo

#ROBOMERGE-SOURCE: CL 16645420 via CL 16645445
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16645453 by patrick enfedaque in ue5-release-engine-test branch]
2021-06-11 15:21:57 -04:00
patrick enfedaque
e178859670 WorldPartition: DataLayer Multiplayer Support
#rb richard.malo, jeanfrancois.dube
#preflight 60a3d144668acd0001d92ec0

#ROBOMERGE-SOURCE: CL 16370566 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16370574 by patrick enfedaque in ue5-release-engine-test branch]
2021-05-18 13:18:48 -04:00
vincent beauchemin
5b488a48fa Remove the ability to create new data layer by just drag & drop. Creating a data layer should not be necessarily easy to do and we expect a full project to only have a few. Current impl was confusing because it worked only for the 1st data layer that you created.
#rb richard.malo
#jira UE-113613

#ROBOMERGE-SOURCE: CL 16354267 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16354275 by vincent beauchemin in ue5-release-engine-test branch]
2021-05-17 12:31:53 -04:00