Commit Graph

209 Commits

Author SHA1 Message Date
patrick boutot
bb3bdc747f MVVM: Change the source sort algo to support destination.
At initalization, one at the time, the source initialize and then execute the bindings. Binding can use a source a soon to be initialize source and a binding can set the value of a source. Both cases need to be taken into account when sorting the sources.
When initializing, the binding can trigger a FieldNotify of another initialized source that can trigger that same source that try to initialize. Add a message if that occurs.
#rb christian.savoie

[CL 31538433 by patrick boutot in ue5-main branch]
2024-02-15 17:11:33 -05:00
dave jones2
a2073bc6c5 UE-206013 - StrongObjectPtr Crash running with -asyncloadingthread
Early runs of async loading in the editor were tripping the TStrongObjectPtr's check that it can only be created on the game thread. The was caused by the FMVVMViewBlueprintCompiler::BlueprintView field. Since we're dealing with a non-UObject here, we typically introduce the object reference either by reflecting the struct, or forcing it to inherit from FGCObject.

However, we can also take advantage of the ownership structure. Both the FMVVMViewBlueprintCompiler and UMVVMBlueprintView are owned by UMVVMWidgetBlueprintExtension_View. Technically, FMVVMViewBlueprintCompiler doesn't need a reference to UMVVMBlueprintView if it's already owned by the extension.

#jira UE-206013
#rb Patrick.Boutot, Francis.Hurteau
#rnx

[CL 31496292 by dave jones2 in ue5-main branch]
2024-02-14 17:27:16 -05:00
zahra nikbakht
58ee7f4dd0 MVVM: add customization for property paths and conversion functions of bindings in the details panel
#jira UE-205044
#rb patrick.boutot

[CL 31485951 by zahra nikbakht in ue5-main branch]
2024-02-14 14:03:50 -05:00
patrick boutot
4f6580c630 MVVM: Fix ensure that warn when there is no delayed bindings to execute. Fix ExecuteAtInit flag when one of the field is not a FieldNotify. The ensure was a false positif and the flag was not removed correctly on the second to last source. Update the ToString method to better identify compiler problems in the future.
#rb editor-ui-systems

[CL 31446359 by patrick boutot in ue5-main branch]
2024-02-13 16:20:41 -05:00
patrick boutot
b426a78a9d Generated widget properties are private unless specified "as variable" in the DetailView. This is to prevent mistakes and to not break encapsulation.
#jira UE-194167
#rb editor-ui-systems
#tests full cook

[CL 31381720 by patrick boutot in ue5-main branch]
2024-02-12 10:10:08 -05:00
patrick boutot
2e9a983dfa MVVM: Function in another widget was not correctly tested for availability. Prevent crash when the availability test fails.
#jira UE-204712
#rb editor-ui-systems

[CL 31303323 by patrick boutot in ue5-main branch]
2024-02-08 15:56:09 -05:00
patrick boutot
98f68d2bf9 MVVM: Fix loading pin values. The TrySetDefault reset the other option so the order was important. Introduced with CL30592781.
#jira UE-205197
#rb editor-ui-systems

[CL 31002167 by patrick boutot in ue5-main branch]
2024-01-30 07:41:13 -05:00
zahra nikbakht
d9a7d6d2d3 MVVM: fix field selector permission setting not working.
Add to the list of disallowed fields.
#rb Patrick.Boutot

[CL 30887449 by zahra nikbakht in ue5-main branch]
2024-01-25 10:53:19 -05:00
zahra nikbakht
80badbd5ce MVVM: allow events to bind to functions with any number of parameters.
#jira UE-199291
#rb Patrick.Boutot

[CL 30825631 by zahra nikbakht in ue5-main branch]
2024-01-23 19:17:27 -05:00
zahra nikbakht
1692e62b5c MVVM: allow viewmodel values to be edited on nested userwidgets.
Expose viewmodels whose creation type is "Create Instance" in the details panel of nested userwidgets and allow editing them independently.
#jira UE-185718
#rb christian.savoie, jared.joyal, Patrick.Boutot

[CL 30717868 by zahra nikbakht in ue5-main branch]
2024-01-19 11:53:42 -05:00
steve robb
7da84c1d1b Replaced UE_NODISCARD with [[nodiscard]].
[CL 30593744 by steve robb in ue5-main branch]
2024-01-12 10:47:04 -05:00
patrick boutot
146c084883 MVVM: Enable K2Node as conversion functions.
#jira UE-190393
#rb editor-ui-systems

[CL 30592808 by patrick boutot in ue5-main branch]
2024-01-12 10:07:58 -05:00
patrick boutot
1293c58646 MVVM: Add PinLinedValue. Use as a variant to easily set the propertypath, function or node of a pin.
#jira UE-200604

[CL 30496334 by patrick boutot in ue5-main branch]
2024-01-08 20:36:10 -05:00
patrick boutot
21dc15a95c MVVM: Update the shared flag correctly after. Issue introduced with CL 30042195.
#rb editor-ui-systems

[CL 30496282 by patrick boutot in ue5-main branch]
2024-01-08 20:31:39 -05:00
patrick boutot
9974aef4a7 MVVM: Add MVVMBlueprintFunctionReference. A struct that can be a K2Node or a UFunction.
#jira UE-200604
#rb editor-ui-systems

[CL 30440347 by patrick boutot in ue5-main branch]
2023-12-22 09:43:14 -05:00
patrick boutot
18bcac7caf MVVM: Fix bad deprecation for PinName. Confused IsValid with IsNone.
#jira UE-200604
#rb patrick.boutot

[CL 30433048 by patrick boutot in ue5-main branch]
2023-12-21 16:18:43 -05:00
patrick boutot
e50e0961e8 MVVM: Rename the property introduced with CL 30396310. It was in conflict with an old property that got removed and was not deprecated properly. Old data tries to load the old property with the bad type.
#rb none

[CL 30402116 by patrick boutot in ue5-main branch]
2023-12-19 15:38:12 -05:00
patrick boutot
abacb37ea4 MVVM: Update the pin from a name to an array of name. That will allow the pin to be used in converion function inside conversion function.
#jira UE-200604
#rb editor-ui-systems

[CL 30396321 by patrick boutot in ue5-main branch]
2023-12-19 11:31:33 -05:00
zahra nikbakht
07b5dae4ec [Backout] - CL30376074
[FYI] zahra.nikbakht
Original CL Desc
-----------------------------------------------------------------
MVVM: allow viewmodel values to be edited on nested userwidgets.
Expose viewmodels whose creation type is "Create Instance" in the details panel of nested userwidgets and allow editing them independently.
#jira UE-185718
#rb Patrick.Boutot

#virtualized

[CL 30378342 by zahra nikbakht in ue5-main branch]
2023-12-18 12:37:49 -05:00
zahra nikbakht
cc8d9c4d96 MVVM: allow viewmodel values to be edited on nested userwidgets.
Expose viewmodels whose creation type is "Create Instance" in the details panel of nested userwidgets and allow editing them independently.
#jira UE-185718
#rb Patrick.Boutot

#virtualized

[CL 30376075 by zahra nikbakht in ue5-main branch]
2023-12-18 10:38:20 -05:00
matt peters
64658cf6ae GetAssetRegistryTags deprecation: Make the old GetAssetRegistryTags and related functions deprecated.
Upgrade the overrides and callsites in all of Epic's code.
Every class that can be subclassed by licensees that has its override change needs to keep the old version of the function as deprecated. Otherwise subclasses that call Super::GetAssetRegistryTags will have a compile error instead of a deprecation warning.
Several classes had their own extension method for GetAssetRegistryTags being passed on to user data classes. Updated all of those to take FAssetRegistryTagsContext just like GetAssetRegistryTags does.
#rnx
#rb Francis.Hurteau

[CL 30224166 by matt peters in ue5-main branch]
2023-12-08 21:45:21 -05:00
patrick boutot
8fcc4bc35b MVVM: Add developer option to copy the generated graph from a binding. Move the common for tthe ENtryRow to the MVVMRowHelper.
#jira UE-200604
#rb editor-ui-systems

[CL 30179639 by patrick boutot in ue5-main branch]
2023-12-07 10:20:55 -05:00
patrick boutot
32891330a9 MVVM: Change the description when there is no viewmodel or bindings or events. Change the condition for when adding the view to the Generated UserWidget.
#jira UE-201683

[CL 30049922 by patrick boutot in ue5-main branch]
2023-12-01 14:57:43 -05:00
patrick boutot
fa42c9b609 MVVM: Rework for the view runtime data. The new format allows for better error detection and new features in progress. The view owns the bindings and events. The source has a list of the bindings. That saves runtime of memory, the delegate doesn't store the binding id. All bindings, events, sources are now sorted for better incremental build performance.
Add a different "key" structures to prevent mistakes with indexes.
Unregister the delay bindings when the source is released.
Store the FieldId, in the source itself. That reduces the amount of work when loading the view.
Add option to delay the events initialization (like we do for bindings).
The binding to evaluate "long path" view models are now separated from regular bindings.
#jira UE-194167
#rb editor-ui-systems

[CL 30042205 by patrick boutot in ue5-main branch]
2023-12-01 11:13:35 -05:00
patrick boutot
158eed9d9c MVVM: Enable setter flag by default. Add flag to generate a public getter. Change the display logic for the optional flag and the setter flag.
#rb editor-ui-systems

[CL 30041317 by patrick boutot in ue5-main branch]
2023-12-01 10:43:39 -05:00