Commit Graph

194 Commits

Author SHA1 Message Date
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
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
jordan hoffmann
38254fee20 [Refactor] Renaming scenegraph 'archetypes' to 'ObjectInstanceData'
[CL 30605552 by jordan hoffmann in ue5-main branch]
2024-01-12 17:22:37 -05:00
jordan hoffmann
c9540402b2 [Feature] Made it so objects will display as archetypes in the details panel if an archetype exists
[BugFix] Inlined Subobjects not displaying correctly in left panel of archetype fixup tool
#rb Francis.Hurteau, karen.jirak
#jira UE-197746

[CL 30573552 by jordan hoffmann in ue5-main branch]
2024-01-11 14:07:26 -05:00
jared cotton
b6aa506f02 SOL-5617 - "The editor UI for [at]editable optionals does not respect property type customization"
- if we encounter a set option in `FDetailPropertyRow` we use its value instead. This allows for cusomizations to just 'work' without any special handling for options.
    - Note: There is some case-handling to ensure the display name is still the options rather than the values.

[CL 30214987 by jared cotton in ue5-main branch]
2023-12-08 13:18:12 -05:00
yoan stamant
38e38ada97 [FScriptSetHelper and FScriptMapHelper iterators]
simple index to iterator replacements
#rb Steve.Robb

[CL 29964524 by yoan stamant in ue5-main branch]
2023-11-28 13:32:31 -05:00
mikko mononen
7a8b0fe450 Fixed array indices not being provided for owner of modified UObject
- Changed FPropertyValueImpl::GenerateArrayIndexMapToObjectNode to not stop on the first object, so that we get array indices for the whole property path in case of sub-objects
- Fixed the event copy in FPropertyNode::NotifyPostChange() to retain array indices from the orignal event

[CL 29955916 by mikko mononen in ue5-main branch]
2023-11-28 03:35:12 -05:00
yoan stamant
4b1168946a [Backout] - CL29948158
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[FScriptSetHelper and FScriptMapHelper iterators]
simple index to iterator replacements
#rb Steve.Robb

[CL 29950621 by yoan stamant in ue5-main branch]
2023-11-27 18:37:04 -05:00
yoan stamant
afa55f619d [FScriptSetHelper and FScriptMapHelper iterators]
simple index to iterator replacements
#rb Steve.Robb

[CL 29948687 by yoan stamant in ue5-main branch]
2023-11-27 17:36:50 -05:00
charles lefebvre
e6d1258b95 Fix external objects collapsing on edit
#rb karen.jirak
#tests Tested in PIE
[FYI] jamie.dale

[CL 29847387 by charles lefebvre in ue5-main branch]
2023-11-20 14:22:17 -05:00
jamie dale
f9913a82a4 Updated the fixed-size array case to also compare against the default via ExportText
#rb dan.oconnor
#rnx

[CL 28724730 by jamie dale in ue5-main branch]
2023-10-12 15:44:34 -04:00
jamie dale
eb0de9aa80 Allow the details panel to distinguish between templates and instances when comparing property values
#rb dan.oconnor
#rnx

[CL 28716547 by jamie dale in ue5-main branch]
2023-10-12 13:17:34 -04:00
jared cotton
6d13f63c39 UE-191200 - "Add UE support for [at]editable fields of optional types"
Add's support for `[at]editable` on optionals:

`FOptionalProperty` changes:
- Added custom `__INIT__` logic for `FOptionalProperty::ExportText` which previously could output no text as the optional value was initialized but returned an empty string as its export text (ie: empty arrays, maps, sets, etc). This caused the future text imports to be incorrect.

`FPropertyNode` changes:
- Added `OptionalValueNode` as private member similar in idea to existing `PropertyKeyNode`. It stores the generated `FPropertyNode` for a FOptionalValue's Value when it is set.
- Added helper function `GetOrCreateOptionalValueNode` which either returns the existing `OptionalValueNode` OR creates one if appropriate.
    - Note: This is where we bind a lambda to our Optional's Value FPropertyNode's `RebuildChildren` event which is how we update/rebuild when needed. In places where we would update/rebuild we instead call our Value to do so instead if set and then update after that has been done via this callback.

Added new widget `SPropertyEditorOptional`
- This either:
    - shows a dropdown of "Set all" or "Unset all" if we have multiple values selected
    - generates the editor for whatever our set value is if we have a single value (See `GetSingleReadAddress`)
    - shows a 'set value' button if we are not set

#JIRA UE-191200
#rb karen.jirak
#rb kurtis.schmidt

[CL 28253719 by jared cotton in ue5-main branch]
2023-09-26 18:57:13 -04:00
dan oconnor
dce9110139 Use string comparison rather than binary comparison to avoid floating point error when propagating default values
#rb Jamie.Dale

[CL 28089942 by dan oconnor in ue5-main branch]
2023-09-21 12:31:46 -04:00
mateo egey
e8bf4ba378 Recent change resulted in a crash in Niagara due to the assumption of a valid parent property to always exist
#rb trivial
[FYI] jodon.karlik

[CL 28032777 by mateo egey in ue5-main branch]
2023-09-20 09:02:52 -04:00
jodon karlik
2c228c5b6e Expand the use of ForceRebuildProperty to include properties inside nested properties such as UStructs.
[CL 28018313 by jodon karlik in ue5-main branch]
2023-09-19 19:01:42 -04:00
mikko mononen
85634ec1c3 Prevent accessing of invalid property nodes after undo and redo.
There's a window after undo (between undo and next property view tick) where property nodes point to the previous data.
If e.g. a property customization needs to refresh cached data after undo, they will try to access the data via old pointers.
Similar issue happens when removing item from array, the tick of IDetailCustomNodeBuilder gets called before we have updates the property nodes.

All these issues happen because when we update the child nodes, there are some parts of code that still hold hard refereces to them, and they are not
actually cleared on FPropertyNode::DestroyTree(). That in turn will cause IPropertyHandle to be in valid state, but pointing to data that has been freed.

- Added bIsDestroyed on property nodes to be able distinguish property nodes which are still alive but destoyed
- Prevent calling Tick() on property tree nodes, whose property node is destroyed
- Changed Gameplay Tag, Tag Container and Query to poll for changes, because undo callbacks are triggered at times when the property handle (and underlying node) is pointing to old data
- The above gameplay tag & co change will also react to property changes from outside the details panel

#jira UE-188117 UE-190882

[CL 27705747 by mikko mononen in ue5-main branch]
2023-09-08 04:42:59 -04:00
mikko mononen
91a97670e9 [Backout] - CL27098170
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
Prevent accessing of invalid property nodes after undo and redo.

There's a window after undo (between undo and next property view tick) where property nodes point to the previous data.
If e.g. a property customization needs to refresh cached data after undo, they will try to access the data via old pointers.
Similar issue happens when removing item from array, the tick of IDetailCustomNodeBuilder gets called before we have updates the property nodes.

All these issues happen because when we update the child nodes, there are some parts of code that still hold hard refereces to them, and they are not
actually cleared on FPropertyNode::DestroyTree(). That in turn will cause IPropertyHandle to be in valid state, but pointing to data that has been freed.

- Detach property nodes recursively on FPropertyNode::DestroyTree(), also clearing parent pointers to that the invlidate property path cannot be followed.
- Call update view (same as tick) after undo to invalidate property nodes which do not point to correct memory anymore
- Use FEditorDelegates::PostUndoRedo instead of undo client, as in some rare cases with consequtive undo/redo the undo client callbacks get called on a stale pointer
- Postpone gameplay tag caching to next tick, since the delegates are called in reverse and SDetailsView gets OnUndoRedo gets called after out customization

#jira UE-190882

[CL 27169489 by mikko mononen in ue5-main branch]
2023-08-17 07:44:28 -04:00
mikko mononen
5bb059d5a7 Prevent accessing of invalid property nodes after undo and redo.
There's a window after undo (between undo and next property view tick) where property nodes point to the previous data.
If e.g. a property customization needs to refresh cached data after undo, they will try to access the data via old pointers.
Similar issue happens when removing item from array, the tick of IDetailCustomNodeBuilder gets called before we have updates the property nodes.

All these issues happen because when we update the child nodes, there are some parts of code that still hold hard refereces to them, and they are not
actually cleared on FPropertyNode::DestroyTree(). That in turn will cause IPropertyHandle to be in valid state, but pointing to data that has been freed.

- Detach property nodes recursively on FPropertyNode::DestroyTree(), also clearing parent pointers to that the invlidate property path cannot be followed.
- Call update view (same as tick) after undo to invalidate property nodes which do not point to correct memory anymore
- Use FEditorDelegates::PostUndoRedo instead of undo client, as in some rare cases with consequtive undo/redo the undo client callbacks get called on a stale pointer
- Postpone gameplay tag caching to next tick, since the delegates are called in reverse and SDetailsView gets OnUndoRedo gets called after out customization

#jira UE-190882

[CL 27098189 by mikko mononen in ue5-main branch]
2023-08-15 04:12:54 -04:00
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