Commit Graph

47 Commits

Author SHA1 Message Date
alain lafleur
1b905ebe01 Merging
//Fortnite/Main/...
to //Fortnite/Dev-FN-32/...

Data driven condition bindings

Authoring and compilation of the new type is hidden behind a project setting.
Fix crash when changing hooked event and trying to edit conversion function parameters.
Fix issue with events valid source check node being purged from the graph upon regenerating connections in the wrapper graph.

Fixes FORT-768257

#tests Tested in editor and in game. Tried with widget property bindings, tried with vm bindings. Verified with multiple bindings to ensure we only execute when it's the condition property that is modified. Ran with cooked version. Tested in standalone and pie.
#rnx
#rb Vincent.Gauthier

[CL 36754418 by alain lafleur in 5.5 branch]
2024-10-01 18:59:25 -04:00
daren cheng
2e95785e75 Add AreSourcesValidForBinding to Async, needed should async finish after binding src / dst become gc'd
#tests PIE, cooked, validation
#rb alain.lafleur
[FYI] Patrick.Boutot

[CL 35836278 by daren cheng in ue5-main branch]
2024-08-27 16:21:50 -04:00
patrick boutot
2e269042c7 MVVM: Add Callback on the WidgetBlueprintGeneratedClass to collect save override. The generated function are transient in editor but save during the cooking process.
#rb Jamie.Dale, Zahra.Nikbakht, Vincent.Gauthier

[CL 35115660 by patrick boutot in ue5-main branch]
2024-07-26 14:43:34 -04:00
patrick boutot
24977a7a73 MVVM: Modification to support extension on the view instance. The class/shared version has the option to create isntance data. The class extension receives that instance and can ack on it. Modified the Panel to create an property of the instance.
#rb daren.cheng
[FYI] Zahra.Nikbakht

[CL 33274421 by patrick boutot in ue5-main branch]
2024-04-26 15:38:33 -04:00
zahra nikbakht
414291a73e MVVM: add an extension to panel widgets to define entry classes for them and allow binding the generated entries to an array of viewmodels
#rb patrick.boutot

[CL 32933358 by zahra nikbakht in ue5-main branch]
2024-04-12 12:24:08 -04:00
zahra nikbakht
7f230554ca MVVM: support view extensions for injecting MVVM-specific data to widgets.
#patrick.boutot
#rb Patrick.Boutot

[CL 32341457 by zahra nikbakht in ue5-main branch]
2024-03-19 18:05:51 -04:00
patrick boutot
20491811d1 MVVM: Parse the property path that start with "self" to check if it actually start with a widet or a viewmodel.
#jira UE-209786
#rb yohann.dossantos

[CL 32323727 by patrick boutot in ue5-main branch]
2024-03-19 09:36:32 -04:00
patrick boutot
7d96f7cae6 MVVM: Add the source needed to run the event. When running the event, early exist if the sources are not valid. Some sources are optional and should not trigger an error. Binding do the same but it's the view that decides when to trigger the binding. Since the event can be trigger from anywhere the event itself has to check.
#jira UE-201178
#rb zahra.nikbakht

[CL 32126833 by patrick boutot in ue5-main branch]
2024-03-08 14:09:12 -05:00
patrick boutot
001f53a277 MVVM: Fix false positive warning. It is valid for a backward binding to set the same property but it is not valid for a forward binding. Forward binding executes on initialization. The order of initialization is not deterministic and would lead to miss use.
#rb editor-ui-systems

[CL 31747057 by patrick boutot in ue5-main branch]
2024-02-22 20:02:06 -05:00
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
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
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
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
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
2ab80be567 MVVM: Big rework of the MVVM view compiler. It add supports for conversion function to go from complex to simple. Supports pin split on simple conversion function. Add ability to to support setter function with more than one argument. Build the list of all the sources.
#jira UE-200602, UE-200602, UE-200602, UE-200602, UE-200602
#rb editor-ui-systems

[CL 29815789 by patrick boutot in ue5-main branch]
2023-11-17 14:09:15 -05:00
bob tellez
f98456e469 [Backout] - CL29797661
[FYI] Patrick.Boutot
Original CL Desc
-----------------------------------------------------------------
MVVM: Big rework of the MVVM view compiler. It add supports for conversion function to go from complex to simple. Supports pin split on simple conversion function. Add ability to to support setter function with more than one argument. Build the list of all the sources.
#jira UE-200602, UE-200602, UE-200602, UE-200602, UE-200602
#rb editor-ui-systems

[CL 29801739 by bob tellez in ue5-main branch]
2023-11-16 23:04:14 -05:00
patrick boutot
c362983f9f MVVM: Big rework of the MVVM view compiler. It add supports for conversion function to go from complex to simple. Supports pin split on simple conversion function. Add ability to to support setter function with more than one argument. Build the list of all the sources.
#jira UE-200602, UE-200602, UE-200602, UE-200602, UE-200602
#rb editor-ui-systems

[CL 29797678 by patrick boutot in ue5-main branch]
2023-11-16 20:11:58 -05:00
patrick boutot
f852893a58 MVVM: Allow a property or a function if it's from the blueprint we are currently compiling.
#jira UE-191812
#rb editor-ui-systems

[CL 28963236 by patrick boutot in ue5-main branch]
2023-10-20 09:15:33 -04:00
patrick boutot
7055c5a8d6 MVVM: Add instanced viewmodel. A way to create your viewmodel inside the view. The viewmodel is private and can only be used by the view. The feature is enabled by a setting. Change how the customization for the viewmodel context hide properties. Add a new submenu for the viewmodel panel.
#rb editor-ui-systems

[CL 27409246 by patrick boutot in ue5-main branch]
2023-08-28 08:59:49 -04:00
patrick boutot
b26e2d88d4 MVVM: Backend for binding event. Didn't use the ComponentDelegateBinding because of initialization order is different. Create a new entry in the ViewClass and reuse the binding library to find the delegate property. At editor time, a BP function is gnerated, similar to Complex Conversion function. When the event is broadcast at runtim, the BP function is executed.
The generated function can assign a property value on a viewmodel, a widget or any property of the UserWidget.
#jira UE-166284
#rb editor-ui-systems

[CL 27236611 by patrick boutot in ue5-main branch]
2023-08-21 08:46:45 -04:00
patrick boutot
b5cd4278b5 MVVM: Fix conversion function with multiples input paths.
Bindings will only be executed once at initialization. The bug happend when more than once source can activate the same binding.
Binding can now be OneWay if at least one argument is a FieldNotify. Otherwise it needs to be a OneTime.
Binding that has hardcoded value, no paths, are now supported.
#rb vincent.gauthier

[CL 26846320 by patrick boutot in ue5-main branch]
2023-08-04 10:49:38 -04:00
patrick boutot
b8b7b1e074 MVVM: Add option to generate conversion graph when compiling and not saved in the packages.
Useful when graph cannot be saved.
#jira UE-130879

[CL 26614927 by patrick boutot in ue5-main branch]
2023-07-26 14:04:59 -04:00