Commit Graph

19 Commits

Author SHA1 Message Date
patrick boutot
67693ef1b7 MVVM: Fix SetViewModel that didn't trigger the child viewmodel binding when changed. Use QAGame UMG_MVVM_LongPath to test. The order the sources are added is important to make sure the bindings are executed in the correct order.
#rb yohann.dossantos
#preflight 642ebaca4847065878530573

[CL 24956638 by patrick boutot in ue5-main branch]
2023-04-06 16:59:04 -04:00
patrick boutot
427ba04371 MVVM: Remove needs to have a SourcePath for ComplexConversionFunction. The source data is inside the function itself and the fieldnotify name is already saved in the class binding.
Update GetBindingInfoFromFieldPath to support viewmodel inside another viewmodel. Add unittest for the function.
Add DoesInitializeAtConstruction on the view class. That is to support manual initialization. When the flag is false, the user is responsible for initializing the view.
Add ReevaluateSourceCreator. A source that was discovered at compile time and added to the list of SourceCreator may need to be evaluated if the path contains notify. That function is similar to SetViewModel but finds the new value from the SourceCreator.
Fix issue when a binding destination can't be evaluated at initialization. Since we only reactivate the bindings link to a source in SetViewModel, some bindings were never registered and never executed after the SetViewModel properly set the binding destination.
Update the view class ToString functions with the new flags.
Prevent adding a new binding when the editor data contains a conversion function and a regular function. That may occur when the user started with a regular binding and changed it afterward for a conversion function. We may not want to reset the binding to be non destructive.
#prefligth 6419e837bb1320be412d274d, 641b068aee0aed13479e6ea3

[CL 24750233 by patrick boutot in ue5-main branch]
2023-03-22 13:07:37 -04:00
zahra nikbakht
e206fdedb6 - Move the list of messages (errors, warnings, info) from the bindings themselves to the owning viewmodel.
- Add a border on each MVVM binding row in the list view of bindings that changes color to red/yellow if there is any error/warning for that binding
- detect if a property is bound to both a MVVM binding and a legacy binding at the same time and add a warning for it.
#jira UE-170983
#jira UE-170403
#rb patrick.boutot, vincent.gauthier
#preflight 6414c614ca2afe3ee6b1c7c8

[CL 24695764 by zahra nikbakht in ue5-main branch]
2023-03-17 16:33:42 -04:00
patrick boutot
91dfcc1e92 MVVM: First step to support viewmodel inside viewmodel. The wiew now support source that is not a UserWidget property. The compiler generates the missing path.
#jira UE-155920
#preflight 6405aa936e1dadfcdaec0442

[CL 24521505 by patrick boutot in ue5-main branch]
2023-03-06 09:41:11 -05:00
henrik karlsson
2f78497e67 [Engine/Plugins]
* Updated private files with IWYU for all plugins which had 3 or less changes made in ue5 main since last integration to fn

#preflight 63bf8d8b577437afe607dc72
#rb none

[CL 23659643 by henrik karlsson in ue5-main branch]
2023-01-12 01:48:34 -05:00
patrick boutot
2a9085be0f Fix bad index uses introduced with CL23494894. Rename CompilerSourceContexts to CompilerUserWidgetPropertyContexts to help prevent futur issues.
#rb yohann.dossantos
#preflight 63b4d00d202bee5e27bd8563

[CL 23580206 by patrick boutot in ue5-main branch]
2023-01-04 15:47:23 -05:00
patrick boutot
1ed29a4a8d MVVM: Selection fixes. Can now select the viewmodel self. Fix the reverse complexe function.
#rb sebastian.nordgren
#preflight 6380e372cc307d6fa5a387bb, 6380ea8833774509007f58f5

[CL 23267974 by patrick boutot in ue5-main branch]
2022-11-25 13:55:44 -05:00
sebastian nordgren
3fdafe9997 MVVM - Replaced all user-facing FStrings with FText. This includes all compiler error messages.
Binding display names now take into account complex conversion functions.

Complex conversion functions now compile correctly.

#rb patrick.boutot
#rnx
#preflight 633ebda6d910a076839e3ddf
#preflight 633ec514a712a61df1354aec

[CL 22388782 by sebastian nordgren in ue5-main branch]
2022-10-06 20:08:12 -04:00
sebastian nordgren
1fb1577293 MVVM - Bindings now have a GUID for identification purposes instead of using the index.
Display name is now more readable when conversion functions are involved.

Moved some conversion function code from MVVMEditorSubsystem to ConversionFunctionHelper so that it can be reused in the compiler.

#rb patrick.boutot
#rnx
#preflight 633d7020164ef40c2e3f308d

[CL 22362227 by sebastian nordgren in ue5-main branch]
2022-10-05 16:05:24 -04:00
Patrick Boutot
deb4338cda MVVM: Compile complex conversion functon and execute them as a regular binding.
#rb sebastian.nordgren
#prefligh 63062f5c5366f61a42bced80

[CL 21544671 by Patrick Boutot in ue5-main branch]
2022-08-24 13:14:51 -04:00
Patrick Boutot
65f39ee67f MVVM: Renamed variables for View Compiler. The indexes was confusing.
#preflight 62d991f03122bf80ae091b83

[CL 21204992 by Patrick Boutot in ue5-main branch]
2022-07-21 14:19:45 -04:00
patrick boutot
d8956d00d0 MVVM: Work in progress for viewmodel in viewmodel
#rb sebatian.nordgren

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 21045209 via CL 21045498 via CL 21045763
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21075357 by patrick boutot in ue5-main branch]
2022-07-13 13:52:41 -04:00
patrick boutot
ca3eb26f53 MVVM: Fix crash when a field is renamed after the path was created.
#rb sebastian.nordgren
#prefligh 62a0a61ae820a589df465387

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 20557185 via CL 20557206 via CL 20557218
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v954-20466795)

[CL 20559714 by patrick boutot in ue5-main branch]
2022-06-08 13:25:42 -04:00
patrick boutot
a22ebd3b60 MVVM: Generate full path for Object property. It now load properly and support downcast.
#rb sebastian.nordgren
#prefligh 628cd4005665463c2104be4b

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 20362934 via CL 20362942 via CL 20362944
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20366217 by patrick boutot in ue5-main branch]
2022-05-25 12:07:51 -04:00
sebastian nordgren
15e617f2aa MVVM: Removed FMVVMViewModelPropertyPath and FMVVMWidgetPropertyPath in favour of FMVVMBlueprintPropertyPath.
[REVIEW] [at]patrick.boutot
#jira UE-145128
#rnx
#preflight 6287737b1e478b95c703f783

#ROBOMERGE-AUTHOR: sebastian.nordgren
#ROBOMERGE-SOURCE: CL 20293477 via CL 20293498 via CL 20293511
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20305090 by sebastian nordgren in ue5-main branch]
2022-05-20 18:54:05 -04:00
patrick boutot
38b2f19b88 MVVM: Blueprint Path can now support long path. A deprecation path exist. The compiler was modified to support long path. A ViewModelCreator is generated for Manual, this allow the setter to works in standalone.
#rb sebastian.nordgren

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 20259322 via CL 20259326 via CL 20259331
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20262972 by patrick boutot in ue5-main branch]
2022-05-18 12:54:12 -04:00
patrick boutot
99e021c9de MVVM: Add add EMVVMBlueprintViewModelContextCreationType::Manual. An option for how to create/select a view model.
Rename a graph temporary function when the compiler didn't requested a GC at the end of the compilation.
#rb sebastian.nordgren

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 20106550 via CL 20107643 via CL 20108182
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20110552 by patrick boutot in ue5-main branch]
2022-05-09 16:35:28 -04:00
sebastian nordgren
f5486be90c Removed static function limitation on conversion functions, which allows us to use functions defined on the UserWidget as conversion functions.
Formatting of errors changed to include the binding name (SourceObject.SourceProperty <-/<->/-> DestObject.DestProperty). Errors are now stored in the binding object again.

Renamed GetConversionFunctionPath to SourceToDestinationFunctionPath and SetConversionFunctionPath to DestinationToSourceFunctionPath.

#jira UE-148310
#review-19644346 @editor-ui-systems
#preflight 624d590e7d2eea4e18eddbb0

[CL 19645570 by sebastian nordgren in ue5-main branch]
2022-04-06 08:17:40 -04:00
Patrick Boutot
5cc291be88 MVVM: Move the ModelViewViewModel plugin to //UE5/Main/
#preflight 62471b2edc6183e3f51a8a07
#preflight 62473c85f73c316f680acef9

[CL 19592606 by Patrick Boutot in ue5-main branch]
2022-04-01 14:21:11 -04:00