82 Commits

Author SHA1 Message Date
patrick boutot
7b306e0840 MVVM: Add the FieldNotify pattern to the base Blueprint. The pattern will be removed from the Widget and from the ViewmodelBase class. A BP variable that has the FieldNotify flag will use a different setter. If the variable is replicated, the OnRep function will broadcast the FieldNotification event. FieldNotify variables cannot be used as a ref argument.
#rb dan.oconnor, leon.huang
#jira UE-182297
#preflight 6436d2cef12d5de7056ef8d9

[CL 25026926 by patrick boutot in ue5-main branch]
2023-04-13 11:55:18 -04:00
phillip kavan
8adf86565f Fix for an ASAN trigger source in compiled Blueprint graphs with direct interface->self pin connections on call site nodes for implemented interface functions.
Note: This is low-risk patch in lieu of a more in-depth fix that will target a future release. This change specifically patches the critical runtime stack issue without breaking backwards-compatibility.

#jira UE-157527
#rb Dave.Jones2
#preflight 63e3d73dfe33a0659482b1ae
#lockdown julien.marchand

[CL 24085354 by phillip kavan in ue5-main branch]
2023-02-08 18:01:20 -05:00
robomerge
48b41b72f3 This change was intended to stay in 21.20. We'll fix this properly in UE5Main.
[Backout] - CL20806081
[FYI] dave.jones2
Original CL Desc
-----------------------------------------------------------------
Added additional check to ensure that we're using the correct interface function.

In order to a stack overrun due to erroneous bytecode, we should issue an error if we're using the incorrect interface function. This is a temporary fix until we find a more permanent solution.

#preflight 62b49598ce64aeefefb869c9
#rb phillip.kavan

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 20806075 via CL 20809840 via CL 20809847 via CL 20809859 via CL 20809869
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20811514 by robomerge in ue5-main branch]
2022-06-24 12:55:16 -04:00
dave jones2
abee2cef48 Added additional check to ensure that we're using the correct interface function.
In order to a stack overrun due to erroneous bytecode, we should issue an error if we're using the incorrect interface function. This is a temporary fix until we find a more permanent solution.

#preflight 62b49598ce64aeefefb869c9
#rb phillip.kavan

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 20806075 via CL 20806081 via CL 20806084 via CL 20806096 via CL 20806100
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20806328 by dave jones2 in ue5-main branch]
2022-06-23 22:42:32 -04:00
dave jones2
bcadd23489 UE-151338 - Implement refactored implicit conversion for math types.
Removed container and struct conversions from the script VM. This introduced complexity that the VM doesn't need, nor did it scale for the various struct types that we want to implicitly convert in Blueprints. Instead, the script VM is *only* aware of float<->double conversion. Container and struct conversions have now been moved to BlueprintTypeConversions. Currently, only the existing FVector3f<->FVector3d conversion has been added, but the remaining LWC types will be added in a subsequent change.

During Blueprint compilation of container and struct conversions, we now inject a function call into the bytecode that performs the conversion, which is better suited to the task instead of burdening the VM with the work. One drawback to this technique is that containers are slightly more inefficient when it comes to conversions. They won't know their type(s) ahead of time, which requires dynamically looking up a conversion function at runtime. We can possibly optimize this further, but the generaly recommendation is to avoid implicit conversions of container types when possible.

Additionally, a couple of convenience functions were added to the KismetCastingUtils to help remove a fair amount of boilerplate code that was used for implicit casting in various node types. ScriptCastingUtils.h was also removed since the VM no longer needs to concern itself with complex conversions.

#jira UE-151338
#preflight 629a507fb42820769428c133
#rb phillip.kavan

[CL 20560449 by dave jones2 in ue5-main branch]
2022-06-08 13:50:57 -04:00
marc audy
cff01aa9fa Added support for native FProperty setters and getters.
Setters and getters are native functions called by FProperties when setting property values with *_InContainer functions.
Setters and getter function names can be manually specified with Setter = Func and Getter = Func keywords inside of UPROEPRTY macro but they will also be automatically parsed if the name is not explicitly specified if the setter or getter function name matches SetPropertyName and GetPropertyName pattern.
The latter behavior can be disabled in UHT's DefaultEngine.ini by setting AutomaticSettersAndGetters=False.
ImportText and ExportTextItem functions have been deprecated and should be replaced with *_InContainer or *_Direct variants.

#rb Steve.Robb
#preflight 6210a377a83e0bcefd03d9e1

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19070318 via CL 19098059 via CL 19104650 via CL 19104661 via CL 19110012
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19147839 by marc audy in ue5-main branch]
2022-02-25 10:39:39 -05:00
dave jones2
ed1b4ed6a5 UE-140327 - Remove ENABLE_BLUEPRINT_REAL_NUMBERS usage
The original ENABLE_BLUEPRINT_REAL_NUMBERS macro was strictly meant for AB testing in the Dev-LWC. Currently, disabling it won't work, and would likely lead to broken behavior. Its presence might incorrectly indicate to licensees that this is an option that can be toggled safely.

#rb marc.audy
#jira UE-140327
#preflight 61fc6449dc0b3ecbecb6f381
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 18864654 in //UE5/Release-5.0/... via CL 18864683 via CL 18864993
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18865002 by dave jones2 in ue5-main branch]
2022-02-04 11:54:52 -05:00
phillip kavan
5728fe86bd Regenerate function signatures referenced by call sites after renaming input/output pins on function graph entry/result nodes.
#jira UE-120063
#rb Ben.Hoffman
#preflight 61fc127fe058822bda9e2ee4
#lockdown Julien.Marchand

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18850711 in //UE5/Release-5.0/... via CL 18850761 via CL 18851168
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18851187 by phillip kavan in ue5-main branch]
2022-02-03 16:15:57 -05:00
dave jones2
c8574d3b74 Merging //UE5/Dev-LargeWorldCoordinates [at] 18802167 to //UE5/Release-5.0
Blueprint real number support.

This change deprecates the use the of "float" and "double" types in Blueprints in favor of a new "real". By default, "real" is back by a double precision floating point number. However, it can be single precision if the number is a native float property or function parameter. This distinction won't be visible to the Blueprint user: in both instances, they'll be represented by "real" pin types. During deserialization, we'll automatically convert Blueprint pin types to use real/doubles, unless they're used to represent native code (including delegate signatures).

One consequence of this change is that we need to perform implicit casts between single and double precision real numbers. During Blueprint compilation, the compiler will detect points in the graph for when either a widening or narrowing conversion needs to occur. Subsequently, the script bytecode will contain a new cast instruction that performs the conversion. This also works on container types, but each entry in the container will have to be converted. This can introduce unwanted overhead for large containers that are frequently passed between Blueprint and native code.

The scope of this change affects Blueprints used by Gameplay, Animation, Control Rig, and UMG.

#rb marc.audy (serialization changes)
#jira UE-116484
#preflight 61f8bdd5a2514ba12ff7bdfc

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 18809077 in //UE5/Release-5.0/... via CL 18809455 via CL 18822548
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823569 by dave jones2 in ue5-main branch]
2022-02-02 05:50:50 -05:00
ben hoffman
3bb0aec4d2 Add null check to FindMatchingReferencedNetPropertyAndPin
#jira UE-92136
#rb marc.audy
#rnx

#ROBOMERGE-SOURCE: CL 12934007 via CL 12934088 via CL 12934140
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12934154 by ben hoffman in Main branch]
2020-04-20 15:09:33 -04:00
jon nabozny
6a6c0f6175 Don't attempt to insert Push Model Dirty Nodes if we know the function is Pure.
We will still warn in that case because it can cause issues with properties not being marked dirty, but will prevent unnecessary work and ensures.

[at]Dan.Oconnor
[FYI] Bob.Tellez


#ROBOMERGE-SOURCE: CL 11402817 via CL 11402845
#ROBOMERGE-BOT: (v654-11333218)

[CL 11402854 by jon nabozny in Main branch]
2020-02-12 18:33:33 -05:00
jon nabozny
bc303f5bae Fixup the Call Function Handler code to use the most up to date Function Context.
This prevents issues where functions can't be found due to stale data.

#rb Jon.Nabozny
#author Dan.OConnor


#ROBOMERGE-SOURCE: CL 11398638 via CL 11399018
#ROBOMERGE-BOT: (v654-11333218)

[CL 11399185 by jon nabozny in Main branch]
2020-02-12 16:58:00 -05:00
Jon nabozny
98bac2ab9b Always generate hooks for Push Model in blueprints.
This should allow for easier testing and a safer transition to Push Model.

[at]Dan.Oconnor
#rb Dan.Oconnor


#ROBOMERGE-OWNER: Jon.nabozny
#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 11387087 via CL 11387095
#ROBOMERGE-BOT: (v654-11333218)

[CL 11394236 by Jon nabozny in Main branch]
2020-02-12 14:52:13 -05:00
robert manuszewski
b938e59c9b Reimplementing FProperty changes from //UE4/Main
+ Reimplemented FProperty related fixed from //UE4/Main:
CL#10791312, 10804850, 10851666, 10855122, 10855198, 10942138, 11030611, 11030639, 11032261, 11061515, 11136964,11138881, 11214238, 11214865

#rb none (previously reviewed in Dev-Core)
[FYI] Chris.Bunnner, Daniel.Lamb


#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 11302985 via CL 11303011 via CL 11303019
#ROBOMERGE-BOT: (v0-11244347)

[CL 11303183 by robert manuszewski in Main branch]
2020-02-10 08:06:56 -05:00
JeanMichel Dignard
7130d293f2 Merging main @ cl 11028482
#rb none
#rnx

[CL 11029060 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-16 10:24:38 -05:00
jon nabozny
a68bcb52d3 Redo changes from CL-10931598 with crash fix and copyright update.
[FYI] Bob.Tellez
#rb None


#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 10982730 via CL 10982741 via CL 10982750
#ROBOMERGE-BOT: (v632-10940481)

[CL 10983012 by jon nabozny in Main branch]
2020-01-14 11:48:31 -05:00
bob tellez
b84ee521f5 Back out changelist 10931598. Likely cause for crash at startup
[FYI] Jon.Nabozny
#rb none

#ROBOMERGE-OWNER: bob.tellez
#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 10933120 via CL 10933137 via CL 10933157
#ROBOMERGE-BOT: (v626-10872990)

[CL 10933303 by bob tellez in Main branch]
2020-01-09 16:58:28 -05:00
jon nabozny
3b3eb87e75 Push Model Replication Core.
Provides the basic interface, machinery, and codegen for allowing games to notify the networking system when properties have been changed.

[at]Ryan.Gerleve, [at]Brian.Bekich, [at]Peter.Engstrom, [at]Mattias.Hornlund, [at]LouisPhilippe.Seguin, [at]Bart.Hawthorne, [at]Marc.Audy, [at]Dan.OConnor
#rb Dan.Oconnor, Peter.Engstrom, Steve.Robb


#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 10931598 via CL 10931603 via CL 10931604
#ROBOMERGE-BOT: (v626-10872990)

[CL 10931773 by jon nabozny in Main branch]
2020-01-09 15:57:29 -05:00
JeanMichel Dignard
70d074639f Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx

[CL 10906274 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 13:26:18 -05:00
jeanmichel dignard
2ce7666d2d Copying //UE4/Dev-Core [at] 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

#ROBOMERGE-OWNER: jeanmichel.dignard
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 10708666 in //UE4/Main/...
#ROBOMERGE-BOT: TOOLS (Main -> Dev-Tools-Staging) (v626-10872990)

[CL 10898071 by jeanmichel dignard in Dev-Tools-Staging branch]
2020-01-07 15:54:23 -05:00
ryan durand
627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00
Chris Gagnon
346a4b05ea Copy up from Dev-Editor @10681378
#rb none

[CL 10837446 by Chris Gagnon in Dev-Tools-Staging branch]
2019-12-19 18:07:47 -05:00
jamie dale
f8970d0f4a Skip type validation of wildcard function arguments in BPs
#jira
#rb Dan.OConnor
#rnx


#ROBOMERGE-SOURCE: CL 10796296 via CL 10796317
#ROBOMERGE-BOT: (v610-10636431)

[CL 10796327 by jamie dale in Main branch]
2019-12-18 10:43:20 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
Chris Gagnon
80918bea22 Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 5110714 by Chris Gagnon in Dev-Editor branch]
2019-02-21 13:05:30 -05:00