Commit Graph

33 Commits

Author SHA1 Message Date
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
mikko mononen
499c30c950 Property Access: Allow to bind to context structs directly.
- 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]
2022-04-14 04:01:28 -04: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
thomas sarkanen
5c8350df5a Property access UI fixes
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]
2022-01-21 04:24:19 -05:00
thomas sarkanen
8a3ab94a47 Fix property access thread safe logic to correctly enforce function metadata overrides
#jira UE-138042
#rb Jurre.deBaare
#preflight 61d6c72f411c1403a3d722df

#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 18529827 in //UE5/Release-5.0/... via CL 18529837
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18529849 by thomas sarkanen in ue5-release-engine-test branch]
2022-01-06 06:29:40 -05:00
thomas sarkanen
b704b70a9b Fix property access thread safety logic for functions
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]
2021-12-08 06:42:05 -05:00
thomas sarkanen
45b9547da9 Anim blueprints now dont participate in unneeded dependency compilation
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]
2021-12-07 05:32:13 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
thomas sarkanen
05ae5319ec Fixed anim node functions not being called correctly
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]
2021-09-14 06:48:20 -04:00
thomas sarkanen
fc7a8f1fc8 Function library support for member reference customizations and anim node functions
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]
2021-09-06 08:02:54 -04:00
patrick laflamme
3a26ef4613 #jira UE-122235 - Crash Opening Dropdown Menus in AnimBP Details Panel
- 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]
2021-08-26 08:10:12 -04:00
mikko mononen
c9b072e3af Property Access: fixed use of OnCanAcceptPropertyOrChildren
- 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]
2021-06-22 06:01:37 -04:00
mikko mononen
8482f1af91 PropertyAccessEditor: Fixed infinite loop when checking if struct can be bound to.
#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]
2021-06-17 05:52:45 -04:00
mikko mononen
420376a021 PropertyAccessEditor
- 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]
2021-06-16 08:19:39 -04:00
thomas sarkanen
82fd08fa69 Added details customization for picking FMemberReferences
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]
2021-06-11 11:04:04 -04:00
Marc Audy
e80ea6b959 Merge from Release-Engine-Staging @ 16444985
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16445122 by Marc Audy in ue5-release-engine-test branch]
2021-05-25 02:43:26 -04:00
thomas sarkanen
920ea372f7 Animation: thread-safe execution and property access improvements
"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]
2021-05-24 04:49:00 -04:00
Thomas Sarkanen
3e92b56aa0 Animation: thread-safe execution and property access improvements
"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]
2021-05-24 04:47:52 -04:00
thomas sarkanen
e3a6607239 Fix warnings about missing variables making property accesses non-functional
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]
2021-05-21 07:59:07 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
Marc Audy
3cfedaade8 Fix PVS warning V502 when comparing against NAME_None in a trinary
[CL 16137741 by Marc Audy in ue5-main branch]
2021-04-28 01:58:36 -04:00
Thomas Sarkanen
16eee0289d Anim node data/compiler refactor
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]
2021-04-22 04:57:09 -04:00
Helge Mathee
e1a217ca7c PropertyAccess / PropertyBinding to support filtering of struct members
#rb thomas.sarkanen
#jira na

[CL 16073109 by Helge Mathee in ue5-main branch]
2021-04-21 10:21:19 -04:00