Commit Graph

215 Commits

Author SHA1 Message Date
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
jordan hoffmann
8e72d4ee7f [Backout] - CL35978510
[FYI] jordan.hoffmann
Original CL Desc
-----------------------------------------------------------------
[BugFix] FPropertyNode::NotifyPostChange wasn't constructing array indices lookup table for chain events

#rb Matt.Kuhlenschmidt
#jira UE-217965

[CL 36019493 by jordan hoffmann in ue5-main branch]
2024-09-04 14:54:40 -04:00
jordan hoffmann
e972238922 [BugFix] FPropertyNode::NotifyPostChange wasn't constructing array indices lookup table for chain events
#rb Matt.Kuhlenschmidt
#jira UE-217965

[CL 35978571 by jordan hoffmann in ue5-main branch]
2024-09-03 15:52:12 -04:00
jodon karlik
d1725a9234 Deprecating FProperty::ElementSize for public access and introducing accessors. Instead of accessing the variable directly, use GetElementSize and SetElementSize in order to facilitate a future change of underlying storage type (to pack FProperty tighter and save some memory).
#rb Steve.Robb
#jira UE-221511
[RN] UStructs above 16.7mb will trip an ensure in the Editor so that they remain compatible with upcoming changes to Max ElementSize. You can disable the ensure with CVar CoreUObject.EnsureAgainstLargeProperties.

[CL 35434186 by jodon karlik in ue5-main branch]
2024-08-09 16:04:11 -04:00
ross smith2
057e2f3f69 Change the default value of PropertyEditor.ShowInlineEditConditionToggleWhenNotSpecifiedAndNotEditable to true.
This restores the legacy behavior as the default for now.

#jira UE-216788
#rb ben.zeigler

[CL 34941484 by ross smith2 in ue5-main branch]
2024-07-19 15:34:56 -04:00
yoan stamant
938f456b05 Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34495793 by yoan stamant in ue5-main branch]
2024-06-19 08:00:57 -04:00
gary yuan
f85b2347ba [Backout] - CL34482589
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34486763 by gary yuan in ue5-main branch]
2024-06-18 20:05:51 -04:00
yoan stamant
b9344fb62e Moved UserDefinedStruct to CoreUObject
#jira UE-216472
#rb Devin.Doucette

[CL 34482607 by yoan stamant in ue5-main branch]
2024-06-18 17:57:11 -04:00
ross smith2
c2a9e61815 In FPropertyNode::SupportsEditConditionToggle don't show the inline edit condition toggle in the case where the edit condition property is not marked as editable and does not have InlineEditConditionToggle set.
This was a surprising case that was undocumented outside of the source code.  The inline edit condition toggle is now only shown when InlineEditConditionToggle is set ( and HideEditConditionToggle is not set ).

The console variable "PropertyEditor.ShowInlineEditConditionToggleWhenNotSpecifiedAndNotEditable" ( off by default ) can be used to restore the legacy behavior if necessary.

#jira UE-216788
#rb logan.buchy, sebastian.arleryd

[CL 34433974 by ross smith2 in ue5-main branch]
2024-06-17 14:48:33 -04:00
george rolfe
f2bb54325d [PropertyEditor] Category Copy/Paste accounts for EditConst flag (but allows pasting to EditCondition properties)
#jira UE-209499
#rb logan.buchy

[CL 33859039 by george rolfe in ue5-main branch]
2024-05-23 08:38:07 -04:00
eric renaudhoude
31b4ebecba PropertyEditor: Fix issue where property change events on array members in array parent elements were indistinguishable between parent & child.
(Fix from [at]Mikko.Mononen.)

#jira UE-213813
#rb logan.buchy, mikko.mononen

[CL 33462585 by eric renaudhoude in ue5-main branch]
2024-05-06 13:44:58 -04:00
logan buchy
7e550e71fc [Backout] - CL33242681
[FYI] marshall.beachy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33319481 by logan buchy in ue5-main branch]
2024-04-30 01:05:58 -04:00
logan buchy
fc52e2fa82 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33242716 by logan buchy in ue5-main branch]
2024-04-25 16:00:45 -04:00
robert millar
113e467dce Backing out to avoid crash opening some assets with instanced structs.
[Backout] - CL33171468
[FYI] logan.buchy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33205050 by robert millar in ue5-main branch]
2024-04-24 13:31:59 -04:00
logan buchy
6a08f9cc13 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33171500 by logan buchy in ue5-main branch]
2024-04-23 12:26:48 -04:00
logan buchy
e92a21f90b [Backout] - CL33154533
[FYI] logan.buchy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33161624 by logan buchy in ue5-main branch]
2024-04-23 00:48:23 -04:00
logan buchy
f0ce334aa6 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33154559 by logan buchy in ue5-main branch]
2024-04-22 18:20:14 -04:00
ben hoffman
bfe8da0019 Struct Utils: Add Property Type Customization support for Instanced Structs
#rb Mikko.Mononen, logan.buchy
#jira none

#ushell-cherrypick of 32823955 by kristof.morva1

new pf 6622aaf6684c0e6f582a4f22

[CL 33110930 by ben hoffman in ue5-main branch]
2024-04-19 14:37:05 -04:00
ben hoffman
7a2b193113 [Backout] - CL32829316
Original CL Desc
-----------------------------------------------------------------
Struct Utils: Add Property Type Customization support for Instanced Structs

#rb Mikko.Mononen, logan.buchy
#jira none

#ushell-cherrypick of 32823955 by kristof.morva1

[CL 32929256 by ben hoffman in ue5-main branch]
2024-04-12 10:33:07 -04:00
ben hoffman
a1fa05d87a Struct Utils: Add Property Type Customization support for Instanced Structs
#rb Mikko.Mononen, logan.buchy
#jira none

#ushell-cherrypick of 32823955 by kristof.morva1

[CL 32829316 by ben hoffman in ue5-main branch]
2024-04-09 12:27:05 -04:00
dan oconnor
71cd1f5b94 Enable edit propagation for changes to sparse class data, explicitly identify the set of objects we want to propagate to
#jira UE-210092
#rb jodon.karlik

[CL 32374455 by dan oconnor in ue5-main branch]
2024-03-20 14:05:25 -04:00
jared cotton
d3a2d4c3ea [Backout] - CL32133091
[FYI] jared.cotton
Original CL Desc
-----------------------------------------------------------------
FORT-715613 - "Crash on "Set to Value" of Verse-Optional in array (details panel)"

- Set/Clear optional calls now properly set their ArrayIndicesPerObject (1/2 of original bug)
- Switched to using property `FullPathName` instead of just `name` for mapping array indices to accomodate identically named nested-containers (2/2 of original bug)
    - ie: `Parameters[MyObject{Parameters[]}]` --> the `inner` parameters array would collide with the `outer` parameters array previously when property `name` was the mapping for array indices

[FYI] thomas.sarkanen
[FYI] karen.jirak

[CL 32145068 by jared cotton in ue5-main branch]
2024-03-09 15:34:49 -05:00
jared cotton
1621096c3a FORT-715613 - "Crash on "Set to Value" of Verse-Optional in array (details panel)"
- Set/Clear optional calls now properly set their ArrayIndicesPerObject (1/2 of original bug)
- Switched to using property `FullPathName` instead of just `name` for mapping array indices to accomodate identically named nested-containers (2/2 of original bug)
    - ie: `Parameters[MyObject{Parameters[]}]` --> the `inner` parameters array would collide with the `outer` parameters array previously when property `name` was the mapping for array indices

[FYI] thomas.sarkanen
[FYI] karen.jirak

[CL 32134383 by jared cotton in ue5-main branch]
2024-03-08 17:26:34 -05:00
jack cai
a55f48884e [PropertyEditor] Fixed a bug causing members of a container property of a struct property not respecting Editable flags
#rb logan.buchy

[CL 31575230 by jack cai in ue5-main branch]
2024-02-16 14:39:44 -05:00
patrick enfedaque
acc5843091 FPropertyNode Editor Archetype/EditConst Policy
- Allow registration/unregistration of IArchetypePolicy/IEditConstPolicy which allow outside systems to provide policies
- Update some details customizations to make usage of new PropertyEditorPolicy::GetArchetype/IsPropertyEditConst which respects registered policies

#rb logan.buchy, Phillip.Kavan, Francis.Hurteau
#rnx

[CL 31467957 by patrick enfedaque in ue5-main branch]
2024-02-14 08:11:39 -05:00