Commit Graph

155 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
sebastian nordgren
7436ea67f4 Duplicating array entries containing a null UObject*/TObjectPtr no longer crashes.
We were blindly assuming that CurrentObject was non-null and crashing on CurrentObject->GetOuter(), even though DuplicateObject() itself was safe to call with null.

#review-20365567 @lauren.barnes
#jira UE-151124
#preflight 628e4dccf622d972b58a1e26

[CL 20429746 by sebastian nordgren in ue5-main branch]
2022-05-30 07:06:45 -04:00
sebastian nordgren
78c273fea4 TitleProperty values are now retrieved recursively. This was a regression from UE4 that caused issues in cases that should have worked, eg. an array of instanced objects, because the category node would cause the search to end.
FPropertyNode::FindChildNode is now actually breadth-first, rather than only being breadth-first for a single level. This was causing an issue whereby title properties were being incorrectly retrieved from the first child rather than the topmost child.

Reported from UDN: https://epicgames.lightning.force.com/lightning/r/Case/5004z00001eFeYlAAK/view

#review @nick.darnell, @mikko.mononen
#preflight 628bb2d4183c1e13462d50cd

[CL 20364792 by sebastian nordgren in ue5-main branch]
2022-05-25 10:56:17 -04:00
sebastian nordgren
6067be8cd7 We now cache the paths to the objects that we modify in FPropertyNode::NotifyPostEditChange() before we call CanEditChange(Chain)Property.
This causes all the modified objects to have their PostEditChangeProperty() handlers called even if the construction script of a blueprint class is triggered by the first invocation.

Most notably, this fixes the case where multiple components of an actor are multi-selected and edited at the same time, but only one of them will receive a PostEditChangeProperty() call.

Reported from UDN: https://epicgames.lightning.force.com/lightning/r/Case/5004z00001eEzehAAC/view

#review-20292399 @lauren.barnes, @marc.audy
#preflight 628ca47af237058787b96692

[CL 20345739 by sebastian nordgren in ue5-main branch]
2022-05-24 05:39:10 -04:00
HertzDonut
90f1d6a993 UStructs can now provide a CanEditChange override by setting the TStructOpsTypeTraitsBase2::WithCanEditChange trait.
PR #8877: Contributed by HertzDonut

#rb sebastian.nordgren
#preflight 628b6da1183c1e134617e4c3

[CL 20323458 by HertzDonut in ue5-main branch]
2022-05-23 07:33:11 -04:00
jamie dale
3a7c7728f1 Allow the temporary used by PropagatePropertyChange to behave as if it had been loaded
Some property types may rely on PPF_SerializedAsImportText to allocate extra state that's required for accurate comparison against another instance

#jira
#rb Rex.Hill
#rnx

#ROBOMERGE-OWNER: jamie.dale
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 20180858 via CL 20180979 via CL 20181019 via CL 20181058 via CL 20181073
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20182513 by jamie dale in ue5-main branch]
2022-05-13 12:07:00 -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
HertzDonut
93cc23f2ef PR #8878: Adding CanEditChange signature that takes a full property chain to the property in question (Contributed by HertzDonut)
#rb sebastian.nordgren
#preflight 625e9801d412434587e6253d

[CL 19806471 by HertzDonut in ue5-main branch]
2022-04-19 07:25:13 -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
Robert Manuszewski
52d331d41c Temp fix for a crash when reverting a struct property value to default in the editor
#rb trivial
#jira none
#preflight none

[CL 19266180 by Robert Manuszewski in ue5-main branch]
2022-03-04 10:11:02 -05:00
Robert Manuszewski
6da981b1c6 Fixing reset to defaults arrow not working
#rb Sebastian.Nordgren
#jira none
#preflight trivial

[CL 19198464 by Robert Manuszewski in ue5-main branch]
2022-03-01 10:32:26 -05:00
marc audy
cff01aa9fa Added support for native FProperty setters and getters.
Setters and getters are native functions called by FProperties when setting property values with *_InContainer functions.
Setters and getter function names can be manually specified with Setter = Func and Getter = Func keywords inside of UPROEPRTY macro but they will also be automatically parsed if the name is not explicitly specified if the setter or getter function name matches SetPropertyName and GetPropertyName pattern.
The latter behavior can be disabled in UHT's DefaultEngine.ini by setting AutomaticSettersAndGetters=False.
ImportText and ExportTextItem functions have been deprecated and should be replaced with *_InContainer or *_Direct variants.

#rb Steve.Robb
#preflight 6210a377a83e0bcefd03d9e1

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19070318 via CL 19098059 via CL 19104650 via CL 19104661 via CL 19110012
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147839 by marc audy in ue5-main branch]
2022-02-25 10:39:39 -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
fe30f189fd The Reset to Default button is no longer hidden when a details row is disabled, but is rather shown greyed out.
#jira UE-139917
#review-18772191 @lauren.barnes
#preflight 61f415e06b5aea38e5bb1726

[CL 18824161 by sebastian nordgren in ue5-main branch]
2022-02-02 07:11:10 -05:00
daren cheng
bb88259ae8 Fix TMap key EditInlineNew if value is EditInlineNew.
#jira UE-137280
#rb sebastian.nordgren
#robomerge 5.0
#preflight 61b90f3f8f57c5c0c2289713

[CL 18461100 by daren cheng in ue5-main branch]
2021-12-14 17:43:57 -05:00
jamie dale
e3da028dc7 Fixed InvalidateCachedState not being called when editing structs
It was specifically looking for an object parent rather than a complex parent, which meant it skipped invalidating the cache when editing a struct (including a nested external struct) rather than an object.

#jira
#preflight skip
#rb Sebastian.Nordgren
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 18340184 via CL 18342197 via CL 18342218 via CL 18342239 via CL 18342503 via CL 18342517
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18342528 by jamie dale in ue5-release-engine-test branch]
2021-12-01 14:05:13 -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
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
sebastian nordgren
926e5fe8bb Added support for parentheses in EditConditions. Added as a result of a UDN feature request.
[at]lauren.barnes

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 18017850 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18017926 by sebastian nordgren in ue5-release-engine-test branch]
2021-11-02 09:24:19 -04:00
sebastian nordgren
899e16bc3e Changed FPropertyNode::GetChildNode(FName) to breadth-first search instead of depth-first, which lead to these types of situations:
class UFoo
{
   struct Bar { int X; } Bar;
   int X;
}

Returning Bar.X instead of just X when searching for "X", because we were iterating into the struct's children before our own.

This entire behaviour is a bit questionable since it doesn't use property paths, and is presumably in place to deal with groups and not structs, but I'm not comfortable making that change without further testing.

#jira UE-126704
[at]matt.kuhlenschmidt, [at]mikko.mononen

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 17721178 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17721189 by sebastian nordgren in ue5-release-engine-test branch]
2021-10-05 10:17:20 -04:00
sebastian nordgren
e99ee26673 Added ensure in GetDefaultValueAsString() to check that default value does not differ per-object (it really shouldn't) in FPropertyNode. If all values are the same, we return only the single default value, but if they differ we'll fallback to the previous behaviour.
This ensure is intended to check if we can simplify the logic here to just return the first object's default value in the near future.

#jira UE-81958
[at]matt.kuhlenschmidt

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 17721129 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v879-17706426)

[CL 17721138 by sebastian nordgren in ue5-release-engine-test branch]
2021-10-05 10:14:42 -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
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
sebastian nordgren
5a66bb1326 FPropertyNode::HasNodeFlags now returns a bool instead of an int32.
#review-16483510 @lauren.barnes
#preflight 60afa1c60bdb27000127825e

[CL 16484743 by sebastian nordgren in ue5-main branch]
2021-05-27 10:52:20 -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