Commit Graph

76 Commits

Author SHA1 Message Date
charles lefebvre
7a5907dc85 Do not use Cast as a const_cast
#rnx

[CL 27611228 by charles lefebvre in ue5-main branch]
2023-09-05 16:44:52 -04:00
jaime cifuentes
56ddf2c344 Fixed BlueprintEditor not getting refreshed after adding an animation layer node into an animation graph
#jira UE-173106
#rb thomas.sarkanen

[CL 26665746 by jaime cifuentes in ue5-main branch]
2023-07-28 03:21:03 -04:00
thomas sarkanen
57122faf0a AnimNext params in Anim BPs
Added a new anim node: AnimNext Parameters. This injects parameters into the AnimNext stack for all leafwards nodes.

Added a new way of binding to parameters on anim nodes.
- Added indirection to UAnimGraphNode_Base to allow different 'binding types' to be authored by deriving from UAnimGraphNodeBinding
- Added new binding type for AnimNext parameters
- Moved existing binding code (inc UI widget creation) into UAnimGraphNodeBinding_Base
- Binding types can be selected on a per-node or per-anim BP basis

Reworked FParamStack API a little
- Allow for better error checking when pushing/popping stack layers. Pushed layers can now only be subsequently popped by passing in the handle of the pushed layer.
- Standalone layers are now wrapped in an opaque handle rather than returning a unique ptr
- GetParamData APIs now perform more involved type checking, allowing derived object types & type conversions to be implemented

Improved parameter type sandboxing for automated tests. If running low-level type tests while execution was happening on another thread, the editor could crash because of invalidating already-existing types.

Lots of other small fixes to get workflows nicer and end-to-end functionality working

#rb Nicholas.Frechette,Jaime.Cifuentes,Jurre.deBaare

[CL 26455905 by thomas sarkanen in ue5-main branch]
2023-07-19 04:36:34 -04:00
lucas dower
5ab02abbc4 [UEFN] Disable pose watches on animation blueprints
#rb benjamin.jillich
#preflight 6454e694fd4b8f4e0dda2d1e

[CL 25353868 by lucas dower in ue5-main branch]
2023-05-05 09:48:44 -04:00
dave jones2
9bab3a527e Misc Blueprint changes:
* Added overloads for FindSpecializedConversionNode and SearchForAutocastFunction that don't use output parameters. There are several instances in the engine where dummy variables are used to get around this.
* Updated the Message_ functions to use template parameter packing. The arguments are forwarded to the underlying FCompilerResultsLog, if one exists. This allows us to use tokenized messages.
* Changed several functions in FCompilerResultsLog to use the coding standard's naming convention. Specifically, arguments need to start with an uppercase letter.

#jira none
#preflight 639778dc2960b732208492ae
#rb phillip.kavan

[CL 23482483 by dave jones2 in ue5-main branch]
2022-12-12 15:50:51 -05:00
Nicholas Frechette
230e9f42b3 Add missing anim BP template features now that skeleton compatibility has been relaxed
#jira UE-168846
#rb Thomas.Sarkanen
#preflight 63752a6c1c114bec050b9127

[CL 23157954 by Nicholas Frechette in ue5-main branch]
2022-11-16 13:30:40 -05:00
Thomas Sarkanen
d9c2b172f7 Skeleton compatibility improvements
Skeleton compatibility is now bi-directional. Specifying a compatible skeleton A -> B now implies B -> A.
Skeleton compatibility is now an editor-only concern. The runtime will attempt to do the 'best it can' via name -> name mappings. Only the editor will prevent assigning incompatible skeletons in (e.g.) asset pickers etc.
Skeleton compatibility checks in editor can now be disabled in the editor preferences (and each asset picker now has a checkbox option in its view settings that allows for quick access to this).

Moves FSkeletonRemapping to its own file (which is now private).
Skeleton remappings are now generated on demand on worker threads just before animation decompression and stored in a registry, guarded by FRWScopeLock for thread-safety.

Fixed some anim BP compiler edge cases where asset references on pins were not getting preloaded correctly, causing skeletons to be erroneously reported as missing.

Exposed the current asset registry filter in SAssetView so that menu extensions can access it (and use it to provide context)

#jira UE-166054
#jira UE-167355
#rb Jurre.deBaare,John.vanderBerg
#preflight 635902602e6690262afa86f9

[CL 22878911 by Thomas Sarkanen in ue5-main branch]
2022-11-01 06:25:59 -04:00
jaime cifuentes
3dd74bd523 Truncation fixes for AnimationGraph and AnimationGraphRuntime module. Part of UE-166634 and UE-166633
#rb @tomas.sarkanen
#jira UE-166634 UE-166633
#preflight 635695410313c24974d9babc

[CL 22725844 by jaime cifuentes in ue5-main branch]
2022-10-24 09:48:39 -04:00
thomas sarkanen
13812111b2 Fix renaming issues with linked anim layers
Move linked layers and graphs to use FMemberReference to reference the stub function used to generate node pins

#jira UE-132472
#rb Jurre.deBaare
#preflight 63358f5ee410691606b6c915

[CL 22260921 by thomas sarkanen in ue5-main branch]
2022-09-29 20:38:46 -04:00
frederick lupien
63fd57b194 Add a context menu option to unexpose all unused pins in LinkedAnimGraph and LinkedAnimLayer nodes in animation blueprints
This is to be able to quickly hide all pins on linked graph nodes based on animation instance that expose a lot of properties

[REVIEW] [at]Thomas.Sarkanen
#tests PIE
#jira UE-156233
[FYI] [at]Paul.McLaurin

[CL 21908860 by frederick lupien in ue5-main branch]
2022-09-08 20:30:49 -04:00
jose villarroel
d81534ce45 Added looping flag to anim sequences and blend spaces. This is used to set the default loop value when creating asset player nodes
#review-20570757 @Aaron.Cox, @Braeden.Shosa, @Thomas.Sarkanen
#jira none
#preflight 62a246ceb17fd2cd5a9ed6da

[CL 20583427 by jose villarroel in ue5-main branch]
2022-06-09 15:43:57 -04:00
lucas dower
f271f57081 Fixed pose watches not removing on graph deletion
#jira UE-137344
#rb Thomas.Sarkanen
#preflight 61e6899caa460e33b1b49093

#ROBOMERGE-AUTHOR: lucas.dower
#ROBOMERGE-SOURCE: CL 18637622 in //UE5/Release-5.0/... via CL 18637640 via CL 18637722
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637735 by lucas dower in ue5-main branch]
2022-01-18 04:59:27 -05:00
benjamin fox
57011b5f32 Disable Pin Value Inspection Tooltips for Pose Pins in AnimBPs
#jira UE-136038
#rb ben.hoffman
#preflight 61d4b8bad17842e547ab783d

#ROBOMERGE-AUTHOR: benjamin.fox
#ROBOMERGE-SOURCE: CL 18512890 in //UE5/Release-5.0/... via CL 18512942
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18512978 by benjamin fox in ue5-release-engine-test branch]
2022-01-04 16:30:54 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05: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
fea7b70391 Fixed crash drag/dropping a sequence player into a template anim BP
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16771196 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16771228 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-24 08:31:04 -04:00
thomas sarkanen
cecebd0cf8 Anim blueprint encapsulation improvements
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]
2021-06-17 08:59:23 -04:00
timothy daoust
13583ddc3c Added the ability to drag layers to create a linked anim layer node
#jira UE-81805

#rb thomas.sarkanen

#ROBOMERGE-SOURCE: CL 16594838 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16594859 by timothy daoust in ue5-release-engine-test branch]
2021-06-08 17:58:38 -04:00
Thomas Sarkanen
56b3ba9d79 Move anim node pin binding to pin context menu
Binding workflow is now common with control rig
Bindings still show up on pins when bound, but the binding combobox is not displayed until bound

#rb Jurre.deBaare

[CL 16465796 by Thomas Sarkanen in ue5-main branch]
2021-05-26 05:12:26 -04:00
Thomas Sarkanen
589c8f6ad0 Linked anim graphs/layers now appear in the "my blueprint" outline and context menu
Titles & icons tweaked to emphasise the linked content, not the type of the node.
Also fixes bounding box init issue when spawning new input pose nodes in linked anim graphs
Added the ability to override the tag checked when vierufying skeleton compatibility by FAssetData. This allows anim BPs to use the functionality as they have a "TargetSkeleton" tag vs. other assets with a "Skeleton" tag.

#rb Jurre.deBaare

[CL 16434383 by Thomas Sarkanen in ue5-main branch]
2021-05-24 06:55:32 -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
Thomas Sarkanen
5364bab827 Backing out CL 16071104
[CL 16071592 by Thomas Sarkanen in ue5-main branch]
2021-04-21 08:01:44 -04:00
Thomas Sarkanen
0ddbfb9894 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.
Includes a thread-safety fix for 4.26 that hasnt made it over to 5.0 yet.
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 16071104 by Thomas Sarkanen in ue5-main branch]
2021-04-21 07:09:28 -04:00
john vanderburg
398515a9d3 Initial support for skeletal remapping, which allows you to play animation assets from one skeleton onto the other.
[CL 15464346 by john vanderburg in ue5-main branch]
2021-02-18 18:42:00 -04:00
danny chapman
9a6d7ca014 Reworks BlendSpace to make UBlendSpace the main runtime class, which is able to handle 1 and 2 dimensions.
#jira UE-108155
#rb thomas.sarkanen

[CL 15406467 by danny chapman in ue5-main branch]
2021-02-15 10:12:58 -04:00