Commit Graph

211 Commits

Author SHA1 Message Date
alexander suvorov
bb9dae5753 Do not mark package as dirty when editing CPF_SkipSerialization property.
#rb Marc.Audy
#fyi charles.bloom
#preflight none

[CL 20455565 by alexander suvorov in ue5-main branch]
2022-06-01 14:10:32 -04:00
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
jamie dale
f842a61eef Allow AddChildStructure to be used by sparse data properties
The child struct properties can't inherit the sparse data flag, as FStructurePropertyNode is already directly editing a block of struct memory.

This also includes a workaround for a crash when propagating changes from a FStructurePropertyNode nested within an object, as the sparse data flag used to workaround it but that is no longer set.

#jira UE-140961
#preflight 61fa9368ad2ae6c3b75c1d66
#rb Mikko.Mononen

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 19816629 via CL 19819868 via CL 19820375
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19821914 by jamie dale in ue5-main branch]
2022-04-19 19:28:11 -04:00
josh may
a389b01905 [Backout] - CL19681262
[FYI] Nick.Darnell
Original CL Desc
-----------------------------------------------------------------
Allow AddChildStructure to be used by sparse data properties

The child struct properties can't inherit the sparse data flag, as FStructurePropertyNode is already directly editing a block of struct memory.

#jira UE-140961
#preflight 61fa9368ad2ae6c3b75c1d66
#rb Mikko.Mononen

#p4v-cherrypick 18826515

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18826037 via CL 18826067 via CL 18826480 via CL 19776180 via CL 19776547 via CL 19776613
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19803101 by josh may in ue5-main branch]
2022-04-19 00:02:52 -04:00
sebastian nordgren
ccfaf382cd Fixed mismerged indentation.
#rb none
#preflight 621cfa2d4972367857a2f603

[CL 19175345 by sebastian nordgren in ue5-main branch]
2022-02-28 11:48:47 -05:00
George Rolfe
24061d010d InvalidEnumValues metadata support in PropertyHandle
(should have been part of 18805091)

#jira none
#preflight 61fae3a2e759a1a1a5ebe83b
#rb none

[CL 18832267 by George Rolfe in ue5-main branch]
2022-02-02 15:20:24 -05:00
jamie dale
d45257c2ba Allow AddChildStructure to be used by sparse data properties
The child struct properties can't inherit the sparse data flag, as FStructurePropertyNode is already directly editing a block of struct memory.

#jira UE-140961
#preflight 61fa9368ad2ae6c3b75c1d66
#rb Mikko.Mononen

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18826037 in //UE5/Release-5.0/... via CL 18826067 via CL 18826480
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18826515 by jamie dale in ue5-main branch]
2022-02-02 10:02:39 -05:00
sebastian nordgren
74959d7da3 FPropertyHandleObject::SetValue when called with an FAssetData no longer always marks an asset as dirty if the new value is identical to the previous value.
This makes an assumption the FObjectPropertyBase::GetExportPath() will continue to return the value in 'ClassName'ObjectPath format, but that seems very unlikely to change and is depended on elsewhere so this can be considered an acceptable risk.

Suggested by UDN: https://epicgames.lightning.force.com/lightning/r/Case/5004z00001ay3pbAAA/view

#rb paul.chipchase
#preflight 61efd42b8c16f8372245a8f2

[CL 18721203 by sebastian nordgren in ue5-main branch]
2022-01-25 06:05:21 -05:00
patrick hardy
9939de5f19 Fixed removing an instanced element from a map or set not using the internal index for object lookup.
#jira UE-139981
#rb marc.audy
#preflight 61eb42cb731e3b4088a504ae

#ROBOMERGE-AUTHOR: patrick.hardy
#ROBOMERGE-SOURCE: CL 18699372 in //UE5/Release-5.0/... via CL 18699470 via CL 18699524
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18699561 by patrick hardy in ue5-main branch]
2022-01-21 18:49:57 -05:00
bob tellez
af1dd6ea3e #UE Move objects referred to by instanced array/set/map properties to the transient package when removed from the container type. This was already the case for ActorComponents, but now applies to all objects referred to by instanced properties.
#rb Marc.Audy

#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 18574430 via CL 18574434 via CL 18574435 via CL 18574440 via CL 18574664 via CL 18574676 via CL 18574681
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18574694 by bob tellez in ue5-main branch]
2022-01-11 13:37:28 -05:00
bob tellez
c1e0611ab5 #UE Move objects referred to by instanced array/set/map properties to the transient package when removed from the container type. This was already the case for ActorComponents, but now applies to all objects referred to by instanced properties.
#rb Marc.Audy

#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 18574430 via CL 18574434 via CL 18574435 via CL 18574440 via CL 18574664 via CL 18574676
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18574681 by bob tellez in ue5-release-engine-test branch]
2022-01-11 13:36:13 -05:00
jamie dale
104da24f38 Fixed a crash when pasting into an array on class sparse data
This would try and get the value of the outer array property (for the inner array value) using FObjectBaseAddress::ObjectOrStruct as the start address, however for class sparse data FObjectBaseAddress::ObjectOrStruct was set to the CDO of the class that owns the sparse data, rather than the start of the sparse data itself. This resulted in a crash as it would try and read garbage from the CDO.

This change removes FObjectBaseAddress::ObjectOrStruct and FObjectBaseAddress::bIsStruct, in favor of storing FObjectBaseAddress::Object (if not editing a struct) and FObjectBaseAddress::StructAddress. FObjectBaseAddress::StructAddress always points to the thing that actually contains FObjectBaseAddress::BaseAddress, which allows the ImportText code to get the correct offset for the array property within the sparse data instance.

#jira
#rb Sebastian.Nordgren
#preflight 61a59b104f5d65edc3a8564b
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18326295 via CL 18328452 via CL 18328534 via CL 18328607 via CL 18330452 via CL 18330516 via CL 18330630
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v895-18170469)

[CL 18330739 by jamie dale in ue5-main branch]
2021-11-30 15:37:45 -05:00
jamie dale
bb2eb686ca Fixed a crash when pasting into an array on class sparse data
This would try and get the value of the outer array property (for the inner array value) using FObjectBaseAddress::ObjectOrStruct as the start address, however for class sparse data FObjectBaseAddress::ObjectOrStruct was set to the CDO of the class that owns the sparse data, rather than the start of the sparse data itself. This resulted in a crash as it would try and read garbage from the CDO.

This change removes FObjectBaseAddress::ObjectOrStruct and FObjectBaseAddress::bIsStruct, in favor of storing FObjectBaseAddress::Object (if not editing a struct) and FObjectBaseAddress::StructAddress. FObjectBaseAddress::StructAddress always points to the thing that actually contains FObjectBaseAddress::BaseAddress, which allows the ImportText code to get the correct offset for the array property within the sparse data instance.

#jira
#rb Sebastian.Nordgren
#preflight 61a59b104f5d65edc3a8564b
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18326295 via CL 18328452 via CL 18328534 via CL 18328607 via CL 18330452 via CL 18330516
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18330630 by jamie dale in ue5-release-engine-test branch]
2021-11-30 15:35:13 -05:00
sebastian nordgren
1791adb9a8 Deprecated bDisplayResetToDefault and the other checkboxes in IPropertyHandle::CreatePropertyNameWidget().
#jira UE-132670
#preflight 61a601ff9a226d9e8235b12e

[CL 18323004 by sebastian nordgren in ue5-main branch]
2021-11-30 06:04:48 -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
daren cheng
b9610d8eca Add FPropertyHandleColor to support copy / paste between different color types.
#jira UETOOL-4586
#rb sebastian.nordgren
#preflight 619521439f7a6462e05b64e9

#ROBOMERGE-AUTHOR: daren.cheng
#ROBOMERGE-SOURCE: CL 18229602 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[bot1]: Main

[CL 18229649 by daren cheng in ue5-release-engine-test branch]
2021-11-17 17:04:14 -05:00
andrew davidson
de67c7d575 LWC: Temporary support added to PropertyHandleVector for vectors of either float or double type.
#jira UE-119797
#preflight 6112a195f19b37000193c274

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

[CL 17124322 by andrew davidson in ue5-release-engine-test branch]
2021-08-10 16:59:18 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Martin Sevigny
fc222e63e0 Allow FNames to be initialized with a string that starts with an underscores from the editor.
https://p4-swarm.epicgames.net/reviews/15934265

#rb MattK
#jira none

#ushell-cherrypick of 15934265 by swarm

#ushell-cherrypick of 16060267 by Martin.Sevigny

[CL 16063439 by Martin Sevigny in ue5-main branch]
2021-04-20 13:33:00 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
sebastian nordgren
0aace23acf FPropertyEditorHelpers::GetMetadataOptionsKey now returns an FName. Internally, FProperty::GetMetaData deals with FName keys, so it makes sense to introduce them as early as possible.
#fyi luke.thatcher

[CL 15872334 by sebastian nordgren in ue5-main branch]
2021-03-31 04:11:32 -04:00
patrick enfedaque
34b9b71b4b Fix invalid failure message (regression of CL 13954062)
#jira UE-97312
[FYI]
#rb jeanfrancois.dube
#preflight 6062630325b98e0001466458

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

[CL 15859813 by patrick enfedaque in ue5-main branch]
2021-03-30 07:51:20 -04:00
Luke Thatcher
199fe78b79 Add "GetKeyOptions" and "GetValueOptions" uproperty metadata to allow combobox dropdowns on TMap FString/FName key/value pairs.
This makes it possible to declare a UPROPERTY like so:

    UPROPERTY(EditAnywhere, meta = (GetKeyOptions="GetValidItemKeys"))
    TMap<FString, FString> MapOfItems;

and have the dropdown appear only on the key field.

#rb Lauren.Barnes
#fyi Vincent.Gauthier,Sebastian.Nordgren
#preflight 606229ea57aca40001ff1441

[CL 15855122 by Luke Thatcher in ue5-main branch]
2021-03-29 16:34:46 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00