Commit Graph

118 Commits

Author SHA1 Message Date
christian savoie
c171565cab [MVVM] Update GetBindingSourceProperty to return function return type properties
* Fixes warning when binding list/panel items to a function instead of a property

[REVIEW] [at]editor-ui-systems
#tests Changed binding from a property to a function
#rb zahra.nikbakht

[CL 36803206 by christian savoie in 5.5 branch]
2024-10-02 17:25:45 -04:00
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
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
daren cheng
f217a26b50 Add verbose info to invalid conversion functions.
#rb daren.cheng
[FYI] editor-ui-systems
#tests editor compile

[CL 36026584 by daren cheng in ue5-main branch]
2024-09-04 18:49:50 -04:00
daren cheng
7b4e0dd09e Lower log level on multiple bindings. Make message more descriptive.
Add validation to MVVM compiler for async events

#rb Vincent.Gauthier
#tests PIE, standalone, validation
[FYI] alain.lafleur

[CL 35837426 by daren cheng in ue5-main branch]
2024-08-27 16:52:01 -04:00
zahra nikbakht
b761017d21 MVVM: fix generated functions not being cleared properly on undo.
The temporary array holding the generated graphs should not be affected by undo because it holds data created on the compiler context which is itself not transactional.
#jira UE-211315
#rb daren.cheng

[CL 35582017 by zahra nikbakht in ue5-main branch]
2024-08-15 18:42:31 -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
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
andrew rodham
927c5d41b3 Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:

Core machinery:
 - FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
 - FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
 - The following interpolation types have been added/improved to add Derivative and Integral functionality
   * FConstantValue: Represents a curve of the form y=c
   * FLinearInterpolation: Represents a curve of the form y=mx + c
   * FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
   * FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
   * FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
   * FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
 - FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
 - FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
 - FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time

Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
  * Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
  * This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
  * Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.

Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type

#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen

[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -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
zahra nikbakht
fb317e089f MVVM Extension: allow extensions to add widgets as variables via MVVM compiler
#rb patrick.boutot

[CL 33417266 by zahra nikbakht in ue5-main branch]
2024-05-02 19:52:49 -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
patrick boutot
7f64c2c677 MVVM: Widget property created by the view compilation are private. The user can create them public with the "As Variable" option.
#rb zahra.nikbakht

[CL 32904496 by patrick boutot in ue5-main branch]
2024-04-11 16:02:01 -04:00
zahra nikbakht
c36e1dc095 MVVM: Move static class member definition into translation unit.
[CL 32345585 by zahra nikbakht in ue5-main branch]
2024-03-19 20:05:36 -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
b48842aa7a MVVM: Evalute the bindings automatically when the source is set but the value didn't changed. That is a global option and an option on the viewmodel definition itself.
Change the category of MVVMDeveloperProjectSettings.
Fix bug in customization, the bCreateSetter flag was set but never propagated to the copied object.
#jira UE-209383
#rb editor-ui-systems

[CL 32242163 by patrick boutot in ue5-main branch]
2024-03-14 08:07:46 -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
259878c511 MVVM: Add an option to auto update the view's viewmodel when it's creation context is the global viewmodel collection. The viewmodel can be added/remove/modified from the global viewmodel collection at anytime and it will update the view.
#jira UE-208792
#rb editor-ui-systems

[CL 31991059 by patrick boutot in ue5-main branch]
2024-03-04 12:09:48 -05:00
zahra nikbakht
29a0cc9b12 MVVM: fix bindings not fired at initialization if they have complex conversion functions which use the same source for different arguments.
#jira UE-208479
#rb yohann.dossantos

[CL 31926973 by zahra nikbakht in ue5-main branch]
2024-02-29 17:50:20 -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
bob tellez
07aaf3ea51 [Backout] - CL31568442
[FYI] Patrick.Boutot
Original CL Desc
-----------------------------------------------------------------
MVVM: Enable compilation warning when there are 2 bindings trying to change the same value. Since the order is not configurable that can lead to binding executing in different orders and do run in an unexpected behavior.
#rb editor-ui-systems

[CL 31638824 by bob tellez in ue5-main branch]
2024-02-20 00:06:07 -05:00
patrick boutot
aaa9e3684a MVVM: Enable compilation warning when there are 2 bindings trying to change the same value. Since the order is not configurable that can lead to binding executing in different orders and do run in an unexpected behavior.
#rb editor-ui-systems

[CL 31571515 by patrick boutot in ue5-main branch]
2024-02-16 13:12:00 -05:00