Commit Graph

275 Commits

Author SHA1 Message Date
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
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
charles lefebvre
e476b609c7 Replace GetEnabledEnumValues by GetRestrictedEnumValues
#rb Guillaume.Guay
#tests PIE

[CL 30412476 by charles lefebvre in ue5-main branch]
2023-12-20 10:40:50 -05:00
charles lefebvre
059cd28bb4 Add GetValidEnumValues to be able to filter enums dynamically
#rb Guillaume.Guay
[FYI] jamie.dale, karen.jirak
#rnx

[CL 30401851 by charles lefebvre in ue5-main branch]
2023-12-19 15:29:51 -05:00
jordan hoffmann
4a7a1915f8 [Refactor] Several changes to property editor needed for scene-graph efforts
- Gave  FDetailItemNode::CreatePropertyHandle support for CustomBuilderRow property handles
- Added FPropertyHandleBase::CreateFPropertyPath method
- Added FPropertyHandleMap::GetElement method to parrody FPropertyHandleSet::GetElement
- Made FPropertNode::CreatePropertyPath return an empty/invalid path if any of it's properties are invalid (likely due to a destroyed object)
- Added FPropertyPath::GetPropertyInfoRef method So that an FPropertyPath element can be mutated without having to recreate the entire path
#rb karen.jirak
#jira UE-192693, UE-192691, UE-197746

[CL 30028123 by jordan hoffmann in ue5-main branch]
2023-11-30 18:16:53 -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
jared cotton
3647507b76 UE-197108 - "Optionals of class types aren't usable in the editor"
- adds support for setting a default value to an FOptionalPRoperty containing a FObjectProperty type (ie: classes, objects, etc)
- copies over the needed existing code-logic for finding all affected objects and sending them pre/post edit events which will mark them as dirty for set/clear optional calls.

#JIRA UE-197108
#rb Maxime.Mercier
[FYI] Kurtis.Schmidt

[CL 29891824 by jared cotton in ue5-main branch]
2023-11-22 13:10:03 -05:00
charles lefebvre
1b003f5e21 Fix Paste with GetAllowedClasses and GetDisallowedClasses
#jira UE-200280
#rnx
#rb karen.jirak, jamie.dale

[CL 29836188 by charles lefebvre in ue5-main branch]
2023-11-19 19:42:53 -05:00