Commit Graph

172 Commits

Author SHA1 Message Date
mikko mononen
2c677cc679 Require property nodes directly on a structure node to validate their data.
This fixes the case that the address pointed by a structure provider changes outside the usual editor functionality.

#preflight 646492952d446eac96a704e3

[CL 25504258 by mikko mononen in ue5-main branch]
2023-05-17 06:10:46 -04:00
mikko mononen
03afbfd05a Improved standalone structure property node handling
- Added IStructureProvider which allows to edit multiple instances of structs at a time
- Improved default value handling in standalone structure nodes
- Fixed bug where expanded nodes did not retain their expansion state when structure nodes were rebuild (e.g. when editing a component)
- Removed caching from Instanced struct customization

#jira UE-172047
#rb Jamie.Dale, Adrien.Logut
#preflight 644a48360f12404fb77173f6

[CL 25214019 by mikko mononen in ue5-main branch]
2023-04-27 10:06:33 -04:00
marcus wassmer
8f4f8a3c66 Submitting for Dan O'Conner
Add the ability to add customizations via property handle that disable object instancing logic associated with CPF_InstancedReference
[REVIEW] [at]marcus.wassmer
#rb jp.flouret,marcus.wassmer,dan.oconner
#preflight 6401477c1d304a54717d2953

#localization none
#tests all relevant operations on array and non-array editable versedevices in the details panel
#preferred_allowlister marcus.wassmer

[CL 24494803 by marcus wassmer in ue5-main branch]
2023-03-02 21:57:17 -05:00
mikko mononen
b6c4bd6a3c PropertyNode: Change OnRebuildChildren to an event.
This fixes nodes not rebuilding when there are multiple listeners.
E.g. FDetailArrayBuilder generating a row that contains instanced object property. Previously changing the object instance would "freeze" the array builder.

#rb Sebastian.Nordgren
#preflight 63e4b920902d6ba787efe0e6

[CL 24094515 by mikko mononen in ue5-main branch]
2023-02-09 05:28:05 -05:00
robert manuszewski
f88a8276f7 Temporarily disabling the use of property setters and getters in property panels
[FYI] Sebastian.Nordgren
#preflight none
#rb none

[CL 23868875 by robert manuszewski in ue5-main branch]
2023-01-26 11:08:17 -05:00
robert manuszewski
519eaddc69 Fixing FPropertyNodeEditStack assuming the read address for struct property nodes is the struct memory address whereas it's a direct property address.
+ Fixing logic errors when getting property values as string

Fixing crashes when creating property panels: making FPropertyNodeEditStack respect error results when acquiring property read address.

[FYI] Sebastian.Nordgren
#jira UE-175113
#preflight none
#rb tbd

[CL 23865531 by robert manuszewski in ue5-main branch]
2023-01-26 04:50:16 -05:00
robert manuszewski
a99f80878e Fixing crashes when creating property panels: making FPropertyNodeEditStack respect error results when acquiring property read address.
[FYI] Sebastian.Nordgren
#preflight none
#rb tbd

[CL 23865218 by robert manuszewski in ue5-main branch]
2023-01-26 03:22:17 -05:00
robert manuszewski
d80a4d4544 Fixing a crash when opening struct-only editor panel
#preflight none
#rb Mateo.Egey

[CL 23847020 by robert manuszewski in ue5-main branch]
2023-01-25 09:11:09 -05:00
robert manuszewski
2b1d313ae6 Property panels will now properly use C++ setters and getters
#rb Sebastian.Nordgren
#preflight 63d0d175be435f17b4b4e545

[CL 23845269 by robert manuszewski in ue5-main branch]
2023-01-25 04:08:38 -05:00
Dominik Peacock
c791af5617 Fix crash resetting property when IPropertyTypeCustomization::CustomizeChildren used on instanced TArray<UObject*> called AddExternalObjects on array elements and supplied a OverrideResetToDefault implementation which simply called ResetToDefault on the property handle that was passed in by CustomizeChildren
#jira none
#rb Sebastian.Nordgren
#preflight 63bdb612c45a2c81e0194baf
#fyi Jason.Walter

[CL 23644379 by Dominik Peacock in ue5-main branch]
2023-01-11 08:24:46 -05:00
karen jirak
14b9047a69 Deleting or re-ordering indexes in data assets causes all indexes to collapse.
For this, as the children of a property node were built, the value of the Expanded flag was not passed from the old child to the rebuilt one. The fix is to, in rebuildChildren in PropertyNode.cpp, save off the property paths of the expanded children prior to the rebuild, and post rebuild of the children, if the property path of a new child is in the saved expansion paths, set the child's expanded flag to true, as well.

#jira UE-170440
#rb sebastian.nordgren
#preflight  6398b41a2540a78d272bd90c

[CL 23494250 by karen jirak in ue5-main branch]
2022-12-13 13:04:38 -05:00
sebastian nordgren
c114529336 If a subobject in the details view was marked pending kill, the details view would keep rebuilding itself every frame until the object was GC'd. We now make sure that the object is valid before running the check.
Reported on UDN.

#review-23303942 @lauren.barnes
#preflight 6385ff094004f73f62be0657

[CL 23325229 by sebastian nordgren in ue5-main branch]
2022-11-30 06:23:33 -05:00
sebastian nordgren
9a1f48bef6 After a details view is created, it is no longer refiltered every frame for N frames where N is the number of FPropertyNodes in the property tree, causing a noticeable slowdown.
When FPropertyNode::EnsureDataIsValid() returns ChildrenRebuilt, it was only marking itself as bChildrenRebuilt = false.

SDetailsViewBase now calls FPropertyNode::MarkChildrenAsRebuilt, which recursively clears the flag from everything.

[REVIEW] [at]lauren.barnes, [at]patrick.boutot, [at]jay.nakai
#preflight 635a889e0d3a231123cb1f6c

[CL 22810916 by sebastian nordgren in ue5-main branch]
2022-10-27 11:33:33 -04:00
karen jirak
bce8800e84 DetailView: Plugins - Model View Viewmodel shows up for QAGame Project Settings searches regardless of search.
In PropertyNode::FilterNodes, filter the property key node, if present, to prevent this.


#jira: UE-165084
#rb sebastian.nordgren
#preflight 63497bbace524ed356e3c61c

[CL 22580642 by karen jirak in ue5-main branch]
2022-10-17 17:41:35 -04:00
Mateo Egey
ca5186f3a6 Added a set of OnPropertyValueChanged delegates for property handles that include the propertychanged event.
This is particularly useful for details panel external structures/objects, as these don't have the "PostEditChange" calls bubble up to the actual owning object.
This enables us to detect whether an interactive change or a direct set change has taken place on an external property, so we can manually call NotifyPostChange with the correct data

#jira none
#rb vincent.gauthier
#preflight skip

[CL 21200722 by Mateo Egey in ue5-main branch]
2022-07-21 10:29:38 -04:00
sebastian nordgren
9b67480811 Removed FPropertyNode::ParentNode.
We already had a ParentNodeWeakPtr that we were checking to make sure the pointer was valid - now we just use that value directly instead.

#review-20890479 @lauren.barnes
#rnx
#preflight 62bef0445d53ca5bcea7785a

[CL 20913710 by sebastian nordgren in ue5-main branch]
2022-07-01 09:48:20 -04:00
lonnie li
48cdea7ba3 Added NoEditInline property metadata to disable inline editing of properties in the details view (EditInline metadata/EditInlineNew classes)
#rb matt.kuhlenschmidt
#preflight 62bc692f6a40330d93b367cd

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 20875861 via CL 20875984 via CL 20875998
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20878402 by lonnie li in ue5-main branch]
2022-06-29 13:40:29 -04:00
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