31 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
bob tellez
cdb994c7e7 #UE Add more info to an ensure
[CL 35912959 by bob tellez in ue5-main branch]
2024-08-29 23:31:16 -04:00
daren cheng
8187a73b14 Add autocast for object types for async conversion functions.
[REVIEW] [at]editor-ui-systems
#rb daren.cheng
[FYI] editor-ui-systems
#tests validation, Editor

[CL 35904712 by daren cheng in ue5-main branch]
2024-08-29 15:40:52 -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
daren cheng
f256db3ad4 Fix Static Analysis MVVM Async
#tests NonUnity
#rb daren.cheng

[CL 35534246 by daren cheng in ue5-main branch]
2024-08-14 10:52:14 -04:00
daren cheng
9121acc4c1 Add Async Node support to MVVM
Add generated ubergraph / multicast support to MVVM.
Some MVVM conversion function compilation refactoring, param / result structs, duplicate method extraction.

#tests PIE, Standalone, Cooked
#rb dan.oconnor, Patrick.Boutot

[CL 35532573 by daren cheng in ue5-main branch]
2024-08-14 09:59:16 -04:00
kevin macaulayvacher
276d09f6df Remove all simple usage of REN_ForceNoResetLoaders from the codebase since the flag has been deprecated and currently does nothing. Simple in this case is direct use of the flag with no conditional logic. More complex uses were removed in another change.
#rnx
#rb Francis.Hurteau

[CL 34424068 by kevin macaulayvacher in ue5-main branch]
2024-06-17 11:55:02 -04:00
kevin macaulayvacher
357c98fb83 - UObject::Rename will always remove a mismatching linker unless explicitly told not to via a new rename flag REN_AllowPackageLinkerMismatch. This is meant to be distinct from the deprecated REN_ForceNoResetLoaders as the intent is inverted: There are few reasons to not want to reset loaders when there is a mismatch between package and linker, and when there is no mismatch, we do not want Rename to implicitly resetloaders (we no longer do as of 33136565). The only use case where mismatched linkers is desired is when objects are _temporarily_ renamed to belong to a staging package and desire to have the object continue loading when the object is moved back to the matching linker package (commonly done during blueprint reinstancing). In such a case, the new flag acknowledging the intentional mismatch is meant to be used.
- Any code causing a linker mismatch needs to explicitly clear loading flags for their object to avoid asserting. This is to make the intention clear that rename will make loading correctly impossible when moving the object to a different linker unintentionally. So either clear the loading flags of the object (i.e. finish loading via load calls such as ConditionalPostLoad) or forcibly allow mismatching via the new flag.

- When marking an export as invalid in FLinkerLoad::InvalidateExport() we now also clear loading flags since it is wasteful to load invalid objects.

- Exports marked as invalid are no longer reset to be valid when the linker is reset for the object instance. This is to prevent reloading invalid objects when re-using a linker already resident in memory if a subsequent package load is requested.

- When UStruct upgrades UFields to FFields, the UStruct objects are marked as invalid to prevent reloading the objects unnecessarily

- Fixes an issue where since Rename can clear the linker for mismatched types, any calls to FLinkerLoad::InvalidateExport needs to be moved before the rename operation to be effective.

- CollectUnreachableObjects will no longer mark unreachable objects as invalid in the linkerloader. That code would mark objects as invalid until the linker is destroyed which incorrectly assumed would happen soon. If however a load for the same package occurs before the linker is destroyed, the in-memory linker would be re-used keeping the marked exports as invalid so those exports would not be loaded (even though they should have been).

#jira UE-212466 UE-214849
#rb Francis.Hurteau, Michael.Galetzka
[RN] UObject::Rename will always remove the renamed object's linker if the rename moves the object into a different package. As a result, any renames occuring while an object is loading will now assert instead of leading to hard to diagnose crashes long after the Rename call has completed. If renaming to a different package is intentional and the linker should not be cleared, the new flag REN_AllowPackageLinkerMismatch can be used to prevent clearing linkers on the object even though the linker is for a different package than the package has been renamed to be part of.

[CL 34304935 by kevin macaulayvacher in ue5-main branch]
2024-06-12 08:47:36 -04:00
patrick boutot
b187d4525a MVVM: Autocast is supported for conversion function.
#rb yohann.dossantos

[CL 34033327 by patrick boutot in ue5-main branch]
2024-05-31 11:27:14 -04:00
patrick boutot
f8d108c01b MVVM: Hide autogenerated function from the picker. Rename old function before creating a new one. That could be reproduced by selecting multiple conversion function on the same binding.
#jira UE-211315, UE-211315
#rb editor-ui-systems

[CL 33403157 by patrick boutot in ue5-main branch]
2024-05-02 14:03:27 -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
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
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
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
patrick boutot
205c1853b9 MVVM: Event do not save the pin id. The graph is rebuilt and the id is new everytime. Warn the user, at compile, when a pin is orphaned. Fix event's setter on the UserWidget (the index is -1 because of that).
#rb editor-ui-systems
#jira UE-130879

[CL 30039594 by patrick boutot in ue5-main branch]
2023-12-01 09:37:20 -05:00
patrick boutot
07fb8f1055 MVVM: Setter inside a struct is now supported. PropertyPath like Viewmodel.StructA.StructB.Value. It will use the property setter and requires a blueprint graph.
[CL 29894383 by patrick boutot in ue5-main branch]
2023-11-22 14:33:59 -05:00
marc audy
59f0feb3e4 Fix warning V595: The pointer was utilized before it was verified against nullptr.
#rnx

[CL 29459035 by marc audy in ue5-main branch]
2023-11-04 01:30:32 -04:00
patrick boutot
52e687f13f MVVM: Instead of saving the name of the root widget for self reference, use a different flag. When the Blueprint asset is renamed the root widget is also renamed and self reference do not work anymore. Redirect the previously saved reference.
IsEmpty is renamed to IsValid. It used to be that we wanted to know if there was a source and a path but now the IsEmpty is confusing.
Fix Widget rename for conversion function pins and event pins.
#jira UE-191812
[REVIEW] editor-ui-systems

[CL 28965810 by patrick boutot in ue5-main branch]
2023-10-20 10:45:57 -04:00
patrick boutot
6708c354bd MVVM: Event generated function are none const.
#jira UE-191812
#rb editor-ui-systems

[CL 28915262 by patrick boutot in ue5-main branch]
2023-10-19 08:48:47 -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
6113ca1d6b MVVM: Rework how nodes are read and created for complex conversion function.
#rb editor-ui-systems

[CL 26773890 by patrick boutot in ue5-main branch]
2023-08-02 11:15:36 -04:00
patrick boutot
e86df75535 MVVM: When a conversion function is virtual, reevaluate at runtime the function.
#jira UE-189301
#rb vincent.gauthier

[CL 26629172 by patrick boutot in ue5-main branch]
2023-07-26 20:20:26 -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
patrick boutot
96ed2dbc61 MVVM: Save the MemberReference with self context. That allow the path to be used in the skeletal compilation phase.
#rb editor-ui-systems

[CL 26053542 by patrick boutot in ue5-main branch]
2023-06-16 11:26:16 -04:00
patrick boutot
096c6f634c MVVM: Fix display of getter functions on Conversion function arguments. Source of a binding can now be a widget in the UI.
#jira UE-185599
#preflight 645e3500592448f08b1fef26

[CL 25454521 by patrick boutot in ue5-main branch]
2023-05-12 13:33:28 -04:00