Commit Graph

674 Commits

Author SHA1 Message Date
Matt Peters
2eca89a984 UClass: Move the UClass pointers to the cppclass's AddReferencedObject function onto a new type FUObjectCppClassStaticFunctions that allows us to easily add new static functions that are reflected in the same way.
Move the existing DeclareCustomVersions function which was declared as a virtual UObject function into a static UObject function using this method.

#rb Steve.Robb
#rnx
#preflight 62827303046b81bf93c15ef2

[CL 20226876 by Matt Peters in ue5-main branch]
2022-05-16 13:00:04 -04:00
Phillip Kavan
8d675a5fe2 Reduce to a stub function if the BP compiler backend raises an error during translation of compiled script statements to bytecode.
#jira UE-144355
#rb Dave.Jones2
#preflight 62573a9b1543022eed4b864c

[CL 19749149 by Phillip Kavan in ue5-main branch]
2022-04-13 20:47:27 -04:00
Phillip Kavan
cf331e1c8b Deprecate an unused member in UBlueprint and remove all usage in engine code where it is no longer required.
#jira None
#rb None
#preflight 62571ff4667d4516641a6122

[CL 19744610 by Phillip Kavan in ue5-main branch]
2022-04-13 15:45:31 -04:00
Phillip Kavan
ac424e82c7 Fix Blueprint compiler to generate a well-formed bytecode expression for a struct literal term when the struct type declares one or more fields of a type that does not have Blueprint support.
Other changes:
- Don't emit an ICE for the binary compatibility test between a literal term type and its associated coerce property when the property's underlying type is not supported; this is an undefined context.
- Include additional context in the error message that's output as a result of encountering an undefined opcode during script execution. Note that the callstack will identify the Blueprint class/function.

#jira UE-144355
#rb Dave.Jones2
#fyi Michael.Noland
#preflight 62559c3fcd5ed4dd0918354d

[CL 19726701 by Phillip Kavan in ue5-main branch]
2022-04-12 15:24:39 -04:00
benjamin fox
cc3bfbb17b Change default behavior for variable name collisions with a native parent class
#jira UE-145343
#preflight 624f17fc3c2aff69c54da4e7
#rb phillip.kavan

[CL 19726695 by benjamin fox in ue5-main branch]
2022-04-12 15:24:29 -04:00
marc audy
6c5a21f990 Expose on spawn properties should use BlueprintSetter if available
#jira UE-147698
#rb Ben.Fox
[FYI] Patrick.Boutot

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 19595555 via CL 19595563 via CL 19595568
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19596435 by marc audy in ue5-main branch]
2022-04-01 17:55:47 -04:00
daren cheng
9f0b63a667 Move BP extensions to private, expose getters / setters instead.
#rb Phillip.Kavan, Patrick.Boutot
#preflight 623b95b99304d833f4105401
#jira UE-145133

[CL 19487374 by daren cheng in ue5-main branch]
2022-03-23 18:12:22 -04:00
dave jones2
031888bd92 UE-145095 - Create Event Signature Error: The function/event does not match the necessary signature - has the delegate or function/event changed
A couple of issues were occurring with delegate signature fixup:

1. Unlike the UserDefinedPins array, the Pins array may contain subpins from a split struct pin. We need to intentionally skip these pins since they aren't a part of the function signature.
2. The IsValidParameter lambda had incorrect logic for determining an input parameter. The presence of both CPF_OutParm *and* CPF_ConstParm indicate that this parameter is actually an input parameter.

#jira UE-145095
#preflight 62336a9e8e2a84d9bb6bc686
#rb phillip.kavan
#lockdown

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19423492 in //UE5/Release-5.0/... via CL 19427216
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19429544 by dave jones2 in ue5-main branch]
2022-03-17 19:08:41 -04:00
phillip kavan
d220f92d1d Fix for an editor crash after duplicating a Blueprint with a missing/unresolved parent class (regression).
#jira UE-145063
#rb Jamie.Dale
#preflight 6231fd4f6e25767a218a368c
#lockdown Nick.Whiting

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 19406250 in //UE5/Release-5.0/... via CL 19406927
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19407615 by phillip kavan in ue5-main branch]
2022-03-16 12:57:05 -04:00
Patrick Boutot
5776f586c6 Blueprint: Add generic metadata on function that can be edit from a plugin.
#rb marc.audy
#preflight 62312a17736af8e0821dcc83

[CL 19404995 by Patrick Boutot in ue5-main branch]
2022-03-16 09:15:55 -04:00
dave jones2
5b9494ac73 UE-145026 - BP Precision issues occur in CM_Character_Jumping (CharacterMovement  EngineTests) when comparing FP literals with serialized floats
We need to ensure that literal default values are interpreted as float strings instead of doubles. We've observed that some older Blueprint content might be using exact comparisons with floats. While this is generally frowned upon, some game logic may depend on this behavior. These issues can be difficult to debug if we covertly interpret literal float data as doubles.

As for the fix, anytime we serialize old pin data that represented a single precision float, we set a flag on the type that ensures we parse its default value string as a single precision float. This flag is also serialized, and isn't changed until the user actually changes the current value to something different.

#jira UE-145026
#preflight 622a416b03062eac59dae469
#rb phillip.kavan
#lockdown

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 19339612 in //UE5/Release-5.0/... via CL 19348994
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19349461 by dave jones2 in ue5-main branch]
2022-03-11 00:35:01 -05:00
jamie dale
00f04864c0 Added FCoreUObjectDelegates::OnObjectPostCDOCompiled
This is similar to UObject::OnPostCDOCompiled, but doesn't require that you implement the logic on a particular class.

#jira
#preflight 6227b758c653e7ef9f572d0b
#rb Rex.Hill

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 19319787 via CL 19319840 via CL 19320685 via CL 19323486 via CL 19323658
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19348039 by jamie dale in ue5-main branch]
2022-03-10 21:51:02 -05: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
jamie dale
9c7fb9246a Fully deprecated the contextless PostCDOCompiled
#jira
#preflight 6210450ccc18880e8bc79da5
#rb none
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 19061229 via CL 19061232 via CL 19071632 via CL 19071711 via CL 19072190
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v920-19070459)

[CL 19073102 by jamie dale in ue5-main branch]
2022-02-22 10:41:22 -05:00
robert millar
5811293e2a Add TargetRules.bFNameOutlineNumber as an option to reduce the size of FName by 4 bytes by storing the number in the name table.
Adds a define UE_FNAME_OUTLINE_NUMBER.
Removes of FName, FMinimalName from memory image support. Adds of FMemoryImageName.
Removal of FMinimalName operator<<, all fields made private, size made variable.
All fields of FScriptName made private.
Added console commands for dumping numbered/unnumbered names and stats.

#rb johan.torp

#ROBOMERGE-OWNER: robert.millar
#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 19058026 via CL 19058611 via CL 19058656 via CL 19061727 via CL 19061740 via CL 19064047
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066701 by robert millar in ue5-main branch]
2022-02-21 02:35:48 -05:00
jamie dale
cfdad64946 Added context to PostCDOCompiled and also call it for skeleton-only compiles
#jira
#preflight 6210112553204823ae8bcf4f
#rb Michael.Noland

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 19058032 via CL 19058041 via CL 19058078 via CL 19058094 via CL 19059619
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066317 by jamie dale in ue5-main branch]
2022-02-21 02:04:58 -05:00
dave jones2
a4e837e0c6 UE-139626 - Fix for implicit cast warning
The implicit cast warnings didn't take into account nodes that aren't compiled, which is effectively commented out Blueprint code. Since cast fixup occurs during compilation, we were reporting false positives.

#jira UE-139626
#rb marc.audy
#preflight 620aaab5067e9bd657b49a73
#lockdown aurel.cordonnier

#ROBOMERGE-AUTHOR: dave.jones2
#ROBOMERGE-SOURCE: CL 18984199 in //UE5/Release-5.0/... via CL 18985316 via CL 18987590
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18987948 by dave jones2 in ue5-main branch]
2022-02-14 18:29:00 -05:00
thomas sarkanen
25bb7598bf Fixed spurious compiler thread-safety errors when batch compiling
Use most up-to-date function's metadata (from skeleton class) rather than the currently-being-compiled reference

#jira UE-140081 - Compiling anim bp causes compile errors on linked layers calling a function in the main anim bp through property access
#rb Jurre.deBaare
#preflight 6203bf13b84bb289770e4b05

#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18917203 in //UE5/Release-5.0/... via CL 18926621 via CL 18927562
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v916-18915374)

[CL 18927611 by thomas sarkanen in ue5-main branch]
2022-02-09 18:38:13 -05:00
Phillip Kavan
4c0d247ecc Clean up invalid/stale dependent references on Blueprint compile/destroy.
No real impact other than to keep cached dependent sets from growing indefinitely even after weakly-referenced assets are destroyed.

#jira None
#rb Dave.Jones2
#preflight 6201a9a36773a36128a9d685

[CL 18896211 by Phillip Kavan in ue5-main branch]
2022-02-07 18:38:21 -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
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
robert manuszewski
97b5e82c0b Deprecating EInternalObjectFlags::PendingKill. Making sure iterators use the appropriate flags based on the current state of PendingKill being enabled or not.
#preflight 61f8f33d537702981c352c7a
#rb Steve.Robb

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 18806353 in //UE5/Release-5.0/... via CL 18808526 via CL 18821789
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822151 by robert manuszewski in ue5-main branch]
2022-02-02 02:21:12 -05:00
marc audy
6553e6cd0a Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)
#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
2022-01-24 15:07:48 -05:00
phillip kavan
a4f29abec7 Back out CL 18640377.
#rnx
#rb None
#jira UE-139599
#preflight None

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18659444 in //UE5/Release-5.0/... via CL 18659473 via CL 18659494
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18659512 by phillip kavan in ue5-main branch]
2022-01-19 11:56:43 -05:00
phillip kavan
d22dc14009 Allow script execution to bypass development-only nodes in a Blueprint function graph when a project is configured to compile them out at cook time.
Previously, this only applied to disabled/development-only nodes in an event graph.

#jira UE-135925
#rb Dave.Jones2
#preflight 61e1bbf57f65c8b2dce9f21d

#ROBOMERGE-AUTHOR: phillip.kavan
#ROBOMERGE-SOURCE: CL 18640337 in //UE5/Release-5.0/... via CL 18640366 via CL 18640384
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18640846 by phillip kavan in ue5-main branch]
2022-01-18 11:21:41 -05:00