This was inadvertenly caused by CL 19250839 that renamed some generated properties to that of the same name as an anim node property (BlendSpace - they used to be called ObjectProperty). Then the code that expanded anim nodes to link up BP logic left a 'set struct member to null' behind because the generated member name matched the pin on the anim graph node.
This fix switches generated members to have a "__" prefix to avoid collisions with user properties, as well as fixing the code on expansion to check the correct property name, which will cause the 'set struct member to null' node to not be left in the exec path.
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 19568495 via CL 19568548 via CL 19568614 via CL 19568625 via CL 19568631
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)
[CL 19568916 by thomas sarkanen in ue5-main branch]
This changes the generated property names for object properties to ensure that object properties of differing class types dont collide. This avoids the warning in FObjectPropertyBase::CheckValidObject (Serialized Class X for a property of Class Y. Reference will be nullptred.).
#jira UE-144970
#jira FORT-455566
#preflight 62262d20b97fb949cf4bea13
#rb Jurre.deBaare
#lockdown simon.tourangeau
#p4v-cherrypick 19251391
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 19285792 in //UE5/Release-5.0/... via CL 19286676
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)
[CL 19291659 by thomas sarkanen in ue5-main branch]
This partially ports a fix from CL 18740288, but improves on when and how sparse class data gets fixed up.
This allows this fix to cover more parent->child load/compile orderings (the previous fix only worked if they were all compiled in the same batch, which isnt always guaranteed.
Original CL desc:
Ensures that cleaned-up sparse class data structs are moved out of the package they are in, thus not requiring a GC step to ensure that batch compilation works correctly.
Without this, it is possible for the NewObject call in FAnimBlueprintCompilerContext::RecreateSparseClassData to attempt to re-use (as it has a fixed name) the currently-existing (but not referenced) object rather than creating a new one.
This also reverts some other changes that were made to try to address related issues.
#jira FORT-444463
#jira UE-140565
#jira UE-140530
#lockdown laurent.delayen
#rb jurre.debaare
#preflight 61fbddc53b22793ca35ebfc0
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18843087 in //UE5/Release-5.0/... via CL 18843109 via CL 18843285
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18843294 by thomas sarkanen in ue5-main branch]
- Ensure that any folded AnimNode property gets remapped correctly for pin-to-property map in FBlueprintDebugData
- Ensure pin value watching for folded properties retrieves the correct value
- Const-ifying some code paths around blueprint pin watching
#jira UE-139995
#preflight 61fa624ddb42673a60239ce1
#rb Thomas.Sarkanen
#lockdown Cristina.Riveron
#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 18824229 in //UE5/Release-5.0/... via CL 18825883 via CL 18826298
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18826349 by jurre debaare 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]
[FYI] Thomas.Sarkanen
Original CL Desc
-----------------------------------------------------------------
Fix asserts/warnings around child anim BPs
Ensures that cleaned-up sparse class data structs are moved out of the package they are in, thus not requiring a GC step to ensure that batch compilation works correctly.
Without this, it is possible for the NewObject call in FAnimBlueprintCompilerContext::RecreateSparseClassData to attempt to re-use (as it has a fixed name) the currently-existing (but not referenced) object rather than creating a new one.
This also reverts some other changes that were made to try to address related issues.
#jira FORT-444463
#rb Phillip.Kavan
#preflight 61f18be3f8088a3d298e6419
#p4v-cherrypick 18740288
#ROBOMERGE-AUTHOR: jose.villarroel
#ROBOMERGE-SOURCE: CL 18773105 in //UE5/Release-5.0/... via CL 18773189 via CL 18773693
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18773704 by jose villarroel in ue5-main branch]
Ensures that cleaned-up sparse class data structs are moved out of the package they are in, thus not requiring a GC step to ensure that batch compilation works correctly.
Without this, it is possible for the NewObject call in FAnimBlueprintCompilerContext::RecreateSparseClassData to attempt to re-use (as it has a fixed name) the currently-existing (but not referenced) object rather than creating a new one.
This also reverts some other changes that were made to try to address related issues.
#rb Phillip.Kavan
#preflight 61f18be3f8088a3d298e6419
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18740288 via CL 18740350 via CL 18740373 via CL 18742029 via CL 18742887
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18743237 by thomas sarkanen in ue5-main branch]
#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 18720630 via CL 18720632 via CL 18720638 via CL 18720809 via CL 18720870
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18720871 by bob tellez in ue5-main branch]
#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 18476381 via CL 18477404 via CL 18477469 via CL 18477893 via CL 18481497
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18481767 by bob tellez in ue5-release-engine-test branch]
Now we dont have to fetch the data out of folded constants to determine that it is invalid
#jira UE-130378 - Optimization pass on new UE5 anim node features
#rb Martin.Wilson
#preflight 61b758e3fc57089133808370
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18443507 in //UE5/Release-5.0/... via CL 18445092
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)
[CL 18445251 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]
Copy mutable data (in the same way as constant data) to ensure that child class containers are coorectly initialized
#jira UE-135480 - Crash compiling child anim BP with invalid mutable data
#rb Jurre.deBaare
#preflight 619cbaaa801b361978a544d8
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18268116 in //UE5/Release-5.0/... via CL 18268125
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18268128 by thomas sarkanen in ue5-release-engine-test branch]
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971
[CL 18081471 by aurel cordonnier 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]
Added the abiity to tag and retrieve any anim graph node (similar to how we could reference linked anim graph nodes previously).
Ported linked anim graph nodes to use the new system
Added the ability to reference any anim graph node by tag (via a new custom node, spawnable from the context menu, with the appearance of an actor reference in a level blueprint)
Added tag display and editing in the bottom-right of anim graph nodes
Added new override point to SGraphNodeK2Var to allow for title widget parameters to be overriden by child classes
#jira UE-126286 - Anim node functions: Add anim node references
#rb Jurre.deBaare
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 17472894 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17472913 by thomas sarkanen in ue5-release-engine-test branch]
In the case where child clases are PostLoaded() after their parents, incorrect node data can be assigned to the class causing OOB access. This fix switches the init of the node data to be lazy/latched, so subsequent subclass loads dont overwrite parent class node data
#jira FROST-4098
#rb Jurre.deBaare
#ROBOMERGE-SOURCE: CL 17386060 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)
[CL 17386077 by thomas sarkanen in ue5-release-engine-test branch]
#jira UE-124719 - Assert occurs when selecting Call Site options other than Automatic or Thread Safe within a Property Access node
#ROBOMERGE-SOURCE: CL 17368301 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)
[CL 17368323 by thomas sarkanen in ue5-release-engine-test branch]
Adds 'template' anim BP concept. These anim BPs have no TargetSkeleton and as such cannot have direct references to animations placed inside of their anim graphs
Adds function call support from anim nodes. All anim graph nodes can now call functions when initialized, updated, evaluated or when they first become relevant.
Relevancy is established using a new FAnimSubsystemInstance_NodeRelevancy which tracks nodes in a local map, per UAnimInstance, if nodes require it.
Functions are displayed on the node if bound, and in the details panel.
Added a new override point to FAnimSubsystemInstance to allow for WT init.
Moved FMemberReference customization into a public header so it can be used on anim node functions.
Wrapped functions up into FAnimNodeFunctionRef structure so they can be re-used more effectively. Converted CallFunction node to use them.
Added a couple of simple BP function libraries to demonstrate the use of the new FAnimNodeContext (this is intended to be a generic way of exposing FAnimNode_Base types to script without the node types themselves having to be known to script directly).
Added the ability to set exposed properties as 'always dynamic' so they appear in mutable data rather than being merged into constants. This allows for the anim node data API to be changed to be less strict (and more script friendly). Now values can be set in mutable data (via GET_MUTABLE_ANIM_NODE_DATA_PTR) and attempted sets to constant data can be ignored and reported to client code.
A few minor crash fixes with edge cases (inc when trying to open an asset editor fails because of a missing skeleton/cancellation).
Also fixes an issue where literal linked anim graph/control rig/custom poroperty node inputs didnt get copied
#rb Jurre.deBaare,Aaron.Cox
#ROBOMERGE-SOURCE: CL 16703644 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16703653 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
[CL 16434092 by Thomas Sarkanen in ue5-main branch]
If a child anim BP is made and is saved without saving its parent, then when the class is reloaded later it will not be able to find the parent's sparse class data in the linker (as it will have been generated again from scratch on load, which doesnt patch the linker until the asset is resaved). This leads to serialization size mismatches.
To address this (and because the sparse class data will always be regenerated as part of compile-on-load), we skip the portion of the CDO's archive that represents the serialized sparse class data if it is null after serialization. It can of course be legitimately null in a lot of cases (say a regular actor Blueprint), but this should have no ill effects and effectively be a seek to the current archive offset.
This CL also fixes a number of child anim BP-related issues. First of all it prevents a crash when accessing out-of-bounds AnimNodeData by ensuring it is correctly duplicated in all circumstances. It also correctly propogates values from root->child sparse class data (in the same manner that anim node data used to be propogated before). This deals with compile-on-load issues where the child classes sparse class data is regenerated without serializing the parent classes sparse class data (see crash fix above).
#jira UE-114674 - Creating a new child anim BP crashes
#rb Fred.Kimberley,Phillip.Kavan,Jurre.deBaare
[CL 16313070 by Thomas Sarkanen in ue5-main branch]