Commit Graph

66 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
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
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
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
0bb197807d MVVM: Test if a field is allowed base on the path, not only on the field owner. That allow to have a Widget's property allowed on a child widget but not on the base widget.
#rb editor-ui-systems

[CL 29753638 by patrick boutot in ue5-main branch]
2023-11-15 13:51:32 -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
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
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