Commit Graph

285 Commits

Author SHA1 Message Date
phillip kavan
fbdd545cfd Fix to ensure that new container items created in the Property Editor get scoped to the correct instance when IDO features are enabled.
#jira UE-224598
#rb Francis.Hurteau

[CL 36748130 by phillip kavan in 5.5 branch]
2024-10-01 17:51:18 -04:00
steve robb
9566ac5def Trivial changes to force an integration to Release-32.00.
#rnx

[CL 36748103 by steve robb in 5.5 branch]
2024-10-01 17:51:05 -04:00
steve robb
28bf104b6a Added cvar to control if non-nullable properties produce an error, a warning or a default object when failing to resolve an object reference.
Default objects will not be created if the class is abstract.

#rb Francis.Hurteau
#jira UE-224118

#tests Ran editor, new unit tests

[CL 36747664 by steve robb in 5.5 branch]
2024-10-01 17:46:30 -04:00
leon huang
00b26f19da Localization:
Fixed a bug with the property matrix and how it handled pasting text into a textbox for text properties. The text correctly gets pasted and imported now.

#rb: Jamie.Dale
#jira: FORT-736831
#test Got the help of UE QA to verify that the problem was no longer occuring in the paste case for text. THe localization caches are now being correctly populated.

[CL 36165775 by leon huang in 5.5 branch]
2024-09-10 19:15:03 -04:00
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
patrick boutot
eb00555601 Add Expand to IPropertyHandle
#jira UE-221075
#rb logan.buchy
#rnx

[CL 35780588 by patrick boutot in ue5-main branch]
2024-08-23 15:34:45 -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
vlad golovan
a8a8e076d6 Engine change to address an issue with copying array of string values. When you copy an array of strings that pasted strings each include "" when pasted.
#rb logan.buchy

[CL 35373726 by vlad golovan in ue5-main branch]
2024-08-07 13:22:41 -04:00
aaron eady
e847fe49f3 #JIRA UE-219729
Engine (array, map, and set add item);

Fixing an issue with the previous TMap and TSet auto increment implementaiton, where if you remove an element in the middle of the array then adding a new entry would incorrectly grab the last index of the container to adjust it. When adding an entry into a container, it will use the first free index (head of the linked list) instead of just adding to the end. Now we'll return the added logical index (meaning, the valid element index and not the internal index) into the container so calling code can get the correct entry if needed.
NOTE: There is still a side effect of how we use the first free index of the container, which is really the last removed element of the container. This means that if we then add an element from an enum, it could be in a position that isn't sequential visually. For example, you add all entries with an enum key from 0-5, those keys will match the container index [0] [1] [2] [3] [4] [5]. You remove index 2 and 4 from the container [0] [1] [3] [5]. Now when you add, it'll add the new element to index 4 but the enum would be 2 [0] [1] [3] [2] [5].

-- Code --
PropertyHandleImpl:
FPropertyValueImpl::AddChild() - Added an int32 return type so we can return the logical index of the added child.
FPropertyHandleSet::AddItem() - Using the child index from AddChild() instead of grabbing the last element on the container.
FPropertyHandleMap::AddItem() - Using the child index from AddChild() instead of grabbing the last element on the container.

[REVIEW] [at]andy.davidson, [at]ronald.koppers
#tests Editor, used test container properties with an enum as the key. Added, removed, and added, to make sure entries were added as expected to the start/end of the container or middle of container.
#rb Andrew.Davidson, logan.buchy, ronald.koppers

[CL 35178527 by aaron eady in ue5-main branch]
2024-07-30 09:44:06 -04:00
brooke hubert
a3aca4b2bb Fixed crash when there are additional children nodes attached to Vector property
#jira UE-0
#rb logan.buchy
#fyi mikko.mononen
#rnx

[CL 34719503 by brooke hubert in ue5-main branch]
2024-06-27 15:19:43 -04:00
steve robb
92463911c8 Fixed mismatched printf format arguments.
#rb brandon.schaefer

[CL 33264801 by steve robb in ue5-main branch]
2024-04-26 11:02:47 -04:00
logan buchy
3034b811d1 Allow GetOptions functions for FName and FString properties to specify a Display Name in addition to value
Opt-in by creating a UFUNCTION with the signature:
`TArray<FPropertyTextFString> GetOptionsWithStrings()`
or
`TArray<FPropertyDisplayNameFName> GetOptionsWithFNames()`

and in the UPROPERTY macros point to the function
```
UPROPERTY(EditAnywhere, meta=(GetOptions="GetOptionsWithStrings"))
FString/FName MyProperty;
```

or

```
UPROPERTY(EditAnywhere, meta=(GetOptions="GetOptionsWithFNames"))
FString/FName MyProperty2;
```

This should bring GetOptions closer to feature parity with enums.  Enums still have one advantage of allowing for tooltips to also be specified.

#rb brooke.hubert
#jira UE-205226

[CL 32950305 by logan buchy in ue5-main branch]
2024-04-12 19:27:23 -04:00
jared cotton
888bd191af SOL-5786 - "Make [at]editable work with type and subtype"
- Adds UI support for [at]editable `type` except for types with a positive type of 'any' (This could be allowed if desired)
- This relies on adding the meta-class for "VerseClassPositiveType" to FPropertyClass's generated from CTypeType

#rb Tom.Noonan
#test SceneGraph tests

[CL 32480874 by jared cotton in ue5-main branch]
2024-03-25 15:47:40 -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
acd2af7d88 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 bug)

#rb kurtis.schmidt
#rb maxime.mercier
#tests SceneGraph Tests

[CL 32305203 by jared cotton in ue5-main branch]
2024-03-18 13:44:55 -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
charles lefebvre
e0cf3c9a01 Arrays and sets: Only split the FormattedString when it is an array of objects so it starts with (" and ends with ")
#jira UE-200280
#tests Copy and paste array of structs and array of objects
[FYI] karen.jirak, brooke.hubert
#rnx

[CL 31575684 by charles lefebvre in ue5-main branch]
2024-02-16 14:50:09 -05:00
jeanmichel dignard
7ae8923f9b PropertyHandle: Renamed the new version of CreatePropertyValueWidget to CreatePropertyValueWidgetWithCustomization to resolve ambiguity between bool and pointer parameters.
#jira UE-200889

[CL 31448182 by jeanmichel dignard in ue5-main branch]
2024-02-13 16:56:55 -05:00
jeanmichel dignard
14f281b048 PropertyHandle: Add a CreatePropertyValueWidget that accounts for customization and thus supports struct properties.
#jira UE-200889
#rb Jamie.Dale

[CL 31436139 by jeanmichel dignard in ue5-main branch]
2024-02-13 13:18:23 -05:00
aaron eady
865fca0a93 #JIRA UE-205463
Engine (map and set add item);

Implementing a way to have the map and set fill in with the next available enum value instead of always doing the default value.

Slack discussion with video: https://epicgames.slack.com/archives/C0447BVGFFZ/p1705510234620249

-- Code --
PropertyHandleImpl:
FPropertyHandleMap::AddItem() - Added a HasKey() lambda. We're then checking if the map property's key is an enum property, if so, we'll loop the enum values to see if the map doesn't already have that enum value as a key. When we find one that isn't in the map, we're adding a child node and then setting the child's key node to be the enum value that is not in the map yet. If the map property's key is not enum then we do the old check for if the default key isn't there.
FPropertyHandleSet::AddItem() - Added a HasElement() lambda. We're then checking if the set property's element is an enum property, if so, we'll loop the enum values to see if the set doesn't already have the enum value as an element. When we find one that isn't in the set, we're adding a child node and then setting the child node to be the enum value that is not in the set yet. If the set property's element is not enum then we do the old check for if the default key isn't there.

UnrealTypes:
FSetProperty::GetElementProperty() - Added this getter to return the ElementProp property.

[REVIEW] [at]guillaume.morreel, [at]matt.stone, [at]karen.jirak, [at]ronald.koppers
#tests PIE, opened a uasset that has a TMap property with enum as the key, added each enum key as I clicked the add item button, changed an entry to something out of order to make sure the add item button would add the next available entry, all the way until it wouldn't add anymore entries because all enum keys were taken. Also tried a TMap property with a gameplaytag as the key to make sure it still worked as expected. Repeated with TSet.
#rb ronald.koppers

[CL 31089421 by aaron eady in ue5-main branch]
2024-02-01 11:22:51 -05:00
charles lefebvre
fffa38146d Fix array paste when the input string contains commas
#jira UE-202295
#rb Brooke.Hubert
#tests Copy paste arrays with commas
#rnx

[CL 30968690 by charles lefebvre in ue5-main branch]
2024-01-29 10:00:34 -05:00
maxime mercier
386a5e2352 Prevent property propagation for object using overridable serialization
#rb Phillip.Kavan

[CL 30928517 by maxime mercier in ue5-main branch]
2024-01-26 12:18:05 -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
vincent gauthier
7093f1e0c8 PropertyEditor Truncation fixes
#rb karen.jirak
#jira UE-166271

[CL 30622888 by vincent gauthier in ue5-main branch]
2024-01-15 14:25:54 -05:00