- Added ability to return a context struct at binding
- Added categories to context structs, which are shown on the menu
- Use BP pin type as default icon for context structs
#jira UE-147507
#review
#preflight 6257d1441543022eed5e79e0
[CL 19752355 by mikko mononen in ue5-main branch]
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]
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]
Nested property validity filter (checking to see if an entry in the menu has compatible sub-menus) is now performed for functions.
Prevented UObject types from being bound to unrelated types via the menu (now does a IsChildOf check - previously you could attempt to bind a UAnimSequence to an AActor!)
Display 'display name' for script properties/functions (also use ScriptName for native ones if available).
#jira UE-126829 - Property Access with UStructs has different "compatibility" visibility than other types
#jira UE-125003 - Unable to Access Transform on Character Member via Property Access
#jira UE-132802 - Property Access shows mangled names for Blueprint-defined struct members
#rb Jurre.deBaare
#preflight 61ea79adf1438e8a4b1c71d2
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18687397 in //UE5/Release-5.0/... via CL 18687402 via CL 18687407
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v902-18672795)
[CL 18687412 by thomas sarkanen in ue5-main branch]
Correctly override the thread safety of return-value properties when a function is marked thread-safe.
Previously functions needed to both have a non-uobject return value AND be thread safe for the access to be marked as thread-safe overall. Now the logic correctly overrides the (usually not thread safe) object return value with the function metadata.
#jira UE-136572 - Inconsistency in thread safety checks in property access vs BP
#rb Keith.Yerex
#preflight 61b0929d7177ccd1a12bbb18
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18404514 in //UE5/Release-5.0/... via CL 18404527
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)
[CL 18404536 by thomas sarkanen in ue5-release-engine-test branch]
This is because dependent BPs at least need a re-link to pick up layout changes in their property access 'bytecode'.
The also requires some re-arranging of where sparse class data gets created, linked and patched.
- Previously sparse class data was patched in the linker at the point of re-creation, but this meant that stale TRASHCLASS sparse class data was could still be in the struct hierarchy when we are BATCH compiling (when batch compiling, each compilation phase is performed in turn for all compiling/dependent BPs). This change removes the sparse class data when the class is sanitized prior to full compilation and stashes it for later patching. This ensures that sparse class data doesnt get linked into stale structs that can then get GCed later, invalidating property links.
- Sparse class data is now linked when its containing ABPGC is linked. It also ensures that the hierarchy of sparse class data mirrors that of the ABPGC. The 'mirror hierarchy' is currently only an invariant of anim blueprints.
Part of this change alters the behavior of UClass::SetSparseClassDataStruct when passed a NULL value. This will now ensure that subclasses are left in a valid state when this occurs. Previously if sparse class data was nulled-out, subclasses would be left pointing at a potentially stale struct in the case where the struct was being regenerated.
Added an override point for subsystems to participate in Link() and made sure property access offsets are patched there, to catch cases where dependent BPs get either a bytecode-only or link-only compile
#jira UE-136035 - Unexpected results from Property Access after changing Lyra animbp
#jira UE-130965 - Multiple crashes involving anim BP sparse class data, inheritance & GC
#rb Phillip.Kavan,Matt.Peters
#preflight 61af321f470c73a8c4933ff5
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18393342 in //UE5/Release-5.0/... via CL 18393349
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)
[CL 18393353 by thomas sarkanen in ue5-release-engine-test branch]
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035
[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485
[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
Due to a previous change, functions were being called on the skeleton class
Also removes an incorrect guard that was preventing binding to native function libraries
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 17502853 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17502870 by thomas sarkanen in ue5-release-engine-test branch]
Also fixes missing error when using a non-thread-safe function call on an anim node
Also exposes CreateNodeFunctionsWidget on base anim graph node widget so that non-derived types can use it
#jira UE-124986 - Users Can Change Anim Node Functions to Non-Thread Safe
#rb Jurre.deBaare
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 17437637 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17437664 by thomas sarkanen in ue5-release-engine-test branch]
- Added 'recursive searchable' property to the FMenuEntryBlock to let the menu searching algorith if it should go down the sub-menus.
- Fixed property binding auto-generated menus that can expand indefinitedly (in a circular fashion) to search only the current level and prevent stack overflow.
#rb Lauren.Barnes
#preflight 6126a50d2a3bf7000162a612
#ROBOMERGE-SOURCE: CL 17316068 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)
[CL 17316070 by patrick laflamme in ue5-release-engine-test branch]
- OnCanAcceptPropertyOrChildren should skip the property, not stop completely
#rb Yoan.StAmant
#ROBOMERGE-SOURCE: CL 16740231 via CL 16740233
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16740234 by mikko mononen in ue5-release-engine-test branch]
#ROBOMERGE-SOURCE: CL 16701818 via CL 16701826
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16701828 by mikko mononen in ue5-release-engine-test branch]
- Added pruning of empty menus in case child classes/structs dont have anything to bind to
- Added OnCanAcceptProperty which can be used to skip properties completelly
#rb Thomas.Sarkanen
#ROBOMERGE-SOURCE: CL 16686969 via CL 16686988
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16686991 by mikko mononen in ue5-release-engine-test branch]
Currently only supports function references when exposed via the details panel. Initial use case is for function bindings on anim nodes. For the customization to apply the FMemberReference must specify the "FunctionReference" metadata.
Prototypes for functions are exposed via metadata "PrototypeFunction" using the full package path to the function.
#rb Phillip.Kavan
#ROBOMERGE-SOURCE: CL 16641661 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v831-16623017)
[CL 16641669 by thomas sarkanen in ue5-release-engine-test branch]
"Call function" anim node:
- Adds the ability to call functions at different points in the anim graph execution (and under different conditions, e.g. when a branch has started blending in). Only thread-safe functions are allowed to be called.
- Adds a thread-safe override point BlueprintThreadSafeUpdateAnimation, called on worker threads for the main instance and for linked instances when they are relevant in the graph (only one call per frame for linked layer instances).
Subsystems:
- Added new override points pre/post event graph(s) (moved override point for worker thread work to around the thread safe update function call).
Improves property access integration:
- Property access now shows (and allows the user to override) the call site of accesses. This is to allow users to see when their property access calls will be made, hopefully making its use less confusing for power users.
- Tweaked UX for property access nodes and dropdowns.
- Anim node pins now have property access bindings in-line on the pin.
Also adds the abilility for the anim graph to opt-in (via a config flag) to more stringent thread safety checks. Disabled by default for now as this requires content fixup.
#jira UE-115745 - Anim Blueprint Encapsulation
#rb Jurre.deBaare
#ROBOMERGE-SOURCE: CL 16434092 in //UE5/Main/... via CL 16434094
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Release-Engine-Staging) (v812-16428861)
[CL 16434096 by thomas sarkanen in ue5-release-engine-staging branch]
"Call function" anim node:
- Adds the ability to call functions at different points in the anim graph execution (and under different conditions, e.g. when a branch has started blending in). Only thread-safe functions are allowed to be called.
- Adds a thread-safe override point BlueprintThreadSafeUpdateAnimation, called on worker threads for the main instance and for linked instances when they are relevant in the graph (only one call per frame for linked layer instances).
Subsystems:
- Added new override points pre/post event graph(s) (moved override point for worker thread work to around the thread safe update function call).
Improves property access integration:
- Property access now shows (and allows the user to override) the call site of accesses. This is to allow users to see when their property access calls will be made, hopefully making its use less confusing for power users.
- Tweaked UX for property access nodes and dropdowns.
- Anim node pins now have property access bindings in-line on the pin.
Also adds the abilility for the anim graph to opt-in (via a config flag) to more stringent thread safety checks. Disabled by default for now as this requires content fixup.
#jira UE-115745 - Anim Blueprint Encapsulation
#rb Jurre.deBaare
[CL 16434092 by Thomas Sarkanen in ue5-main branch]
Now if we detect an error in a copy we still rebuild the library, although the copy that was in error will not function, as expected
#jira UE-115600 - Fast Path pin update can break when anim BP compilation generates warnings
#rb Jurre.deBaare
#ROBOMERGE-SOURCE: CL 16416211 in //UE4/Release-4.27/... via CL 16416212
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v811-16416015)
[CL 16416221 by thomas sarkanen in ue5-release-engine-staging branch]
Per-node constant data is now held on a generated struct as part of sparse class data.
Per-node mutable data (i.e. pin links/property access mappings) is now held on a generated 'mutable data' struct that is compiled as part of the generated class.
The anim BP compiler is now extended more conventionally using UAnimBlueprintExtension, derived from UBlueprintExtension. This directly replaces the older 'compiler handler' pattern that was added in an emergency fashion for 4.26. Anim graph nodes now request their required extensions and these are held on the UAnimBlueprint in the UBlueprint::Extensions array. The Extensions array is potentially refreshed with any node addition or removal. The Extensions array is force-refreshed each time an anim BP is compiled for the first time to deal with newly added or removed requirements.
Const-corrected a bunch of UAnimInstance/FAnimInstanceProxy APIs that rely on (now truly) const data.
Added a split state/constant version of FInputScaleBiasClamp to allow some of its data to be split into constants.
Tweaked alignment/ordering of FPoseLinkBase to save a few bytes per pose link.
Deprecated FAnimNode_Base::OverrideAsset in favor of a more UAnimGraphNode_Base-based approach. Individual nodes can still have runtime overrides via specific accessors. The new approach will also give us the oppurtunity to override multiple assets per node if required in the future.
Moved property access into Engine module & removed event support from it - this was never used.
Reworked property access compilation API a little - construction/lifetime was a bit confusing previously.
Optimized path used to create UK2Node_StructMemberSet nodes in per-node custom events. When using mutable data, the structure used is large and very sparsely connected (i.e. only a few properties are written) so we only create pins that are actually going to be used, rather than creating all of them and conly connecting a few.
Patched the following nodes to use the new data approach:
- Asset players (sequences, blendspaces, aim offsets)
- Blend lists
- Ref poses
- Roots
#rb Jurre.deBaare, Martin.Wilson, Keith.Yerex
[CL 16090510 by Thomas Sarkanen in ue5-main branch]