40 Commits

Author SHA1 Message Date
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
dan oconnor
17d0975d77 Handle preloading of animation assets that discover they have more dependencies after being loaded
#rb Ben.Hoffman
#jira

[CL 27388178 by dan oconnor in ue5-main branch]
2023-08-25 15:24:34 -04:00
jose villarroel
710ad21f92 [Backout] - CL27251115
[FYI] jose.villarroel
Original CL Desc
-----------------------------------------------------------------
Added Anim Blueprint Editor preference to disable showing assets in the context menu of anim graph. This results in a significantly faster context menu in large projects.
[REVIEW] [at]Aaron.Cox, [at]Thomas.Sarkanen

[CL 27252044 by jose villarroel in ue5-main branch]
2023-08-21 16:14:50 -04:00
jose villarroel
a633cc5d56 Added Anim Blueprint Editor preference to disable showing assets in the context menu of anim graph. This results in a significantly faster context menu in large projects.
[REVIEW] [at]Aaron.Cox, [at]Thomas.Sarkanen

[CL 27251149 by jose villarroel in ue5-main branch]
2023-08-21 15:51:13 -04:00
thomas sarkanen
5263a174df Fix crash on loading an anim BP with pose hander nodes that require skeleton updates to their animations
This manifested as a problem dragging in MetHumans from Quixel Bridge.
Adding a preload dependency for asset player nodes (which include pose handlers) that recurses and preloads all dependencies too prevents load ordering issues where subobjects in anim assets were sometimes not correctly loaded

[FYI] Jurre.deBaare
#jira UE-190467
#rb Nicholas.Frechette

[CL 26482451 by thomas sarkanen in ue5-main branch]
2023-07-20 07:42:06 -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
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
frederick lupien
e24dddeb56 Fix graph template compilation crash when referencing animation assets (sequences, blend spaces, etc)
#jira UE-162997
#rb Thomas.Sarkanen
#tests Graph template compilation

[CL 21891354 by frederick lupien in ue5-main branch]
2022-09-08 07:11:04 -04:00
thomas sarkanen
930c912205 Added BP action DB filtering
Applies optional filtering to the BP context menu and related UIs.

Primarily this is implemented at the BlueprintActionDatabase/Registrar level as permissions are mostly static. One additional filter has been added to BlueprintActionFilter to handle filtering out items from assets that cannot be referenced from *this* blueprint.

Added type filtering to the variable type tree to prevent creating disallowed variable types. This piggybacks on the already-existing FImportedPinTypeSelectorFilter.

Also added some auditing console commands: bp.AuditThreadSafeFunctions and bp.AuditFunctionCallsForBlueprint
Corrected FBlueprintEditorUtils::HasFunctionBlueprintThreadSafeMetaData to not track FUNC_BlueprintEvent flags for native functions.

#jira UE-156715
#rb Phillip.Kavan,Jason.Stasik
#preflight 62b9bedae77151e5996dd658

#ROBOMERGE-OWNER: thomas.sarkanen
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20890474 via CL 20891658 via CL 20892543 via CL 20892549
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20896198 by thomas sarkanen in ue5-main branch]
2022-06-30 11:25:52 -04:00
marc audy
8ca5f6a8be [Backout] - CL20807495
[FYI] Thomas.Sarkanen
Original CL Desc
-----------------------------------------------------------------
Added BP action DB filtering

Applies optional filtering to the BP context menu and related UIs.

Primarily this is implemented at the BlueprintActionDatabase/Registrar level as permissions are mostly static. One additional filter has been added to BlueprintActionFilter to handle filtering out items from assets that cannot be referenced from *this* blueprint.

Added type filtering to the variable type tree to prevent creating disallowed variable types.

Also added some auditing console commands: bp.AuditThreadSafeFunctions and bp.AuditFunctionCallsForBlueprint
Corrected FBlueprintEditorUtils::HasFunctionBlueprintThreadSafeMetaData to not track FUNC_BlueprintEvent flags for native functions.

#jira UE-156715
#rb Phillip.Kavan,Jason.Stasik
#preflight 62b572f1970a8db33765bf83

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20813981 via CL 20863344 via CL 20871119 via CL 20871207
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20876885 by marc audy in ue5-main branch]
2022-06-29 12:27:43 -04:00
phillip kavan
198fbe8f64 Added BP action DB filtering
Applies optional filtering to the BP context menu and related UIs.

Primarily this is implemented at the BlueprintActionDatabase/Registrar level as permissions are mostly static. One additional filter has been added to BlueprintActionFilter to handle filtering out items from assets that cannot be referenced from *this* blueprint.

Added type filtering to the variable type tree to prevent creating disallowed variable types.

Also added some auditing console commands: bp.AuditThreadSafeFunctions and bp.AuditFunctionCallsForBlueprint
Corrected FBlueprintEditorUtils::HasFunctionBlueprintThreadSafeMetaData to not track FUNC_BlueprintEvent flags for native functions.

#jira UE-156715
#rb Phillip.Kavan,Jason.Stasik
#preflight 62b572f1970a8db33765bf83

#ROBOMERGE-OWNER: phillip.kavan
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20807495 via CL 20815974 via CL 20816610 via CL 20816624
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20818683 by phillip kavan in ue5-main branch]
2022-06-24 18:53:46 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
aurel cordonnier
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -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
1eeb3f489b Fix crash when compiling-on-load a graph that contains NULL nodes
#rb Jurre.deBaare

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

[CL 16771221 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-24 08:30:55 -04:00
thomas sarkanen
78d17cb897 Fix error reporting for dynamic values that are not exposed on pins
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16739973 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16739975 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-22 04:46:11 -04:00
thomas sarkanen
665afc556c Fixed being unable to open newly-spawned empty blend sapce graphs
#jira UE-118296 - Unable to open newly spawned Blend Space Graph nodes
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16705828 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16705837 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-17 12:08:56 -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
thomas sarkanen
a8fc96c94a Fix asset player names and 'empty' players not appearing in context menus correctly
Also fix asset references persisting when applying a property access binding

#jira UE-116509 - Unable to create empty Blend Space Graphs in the Anim Graph
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16657336 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16657350 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-14 08:23:08 -04:00
Thomas Sarkanen
ebc803bd83 Unify titles of asset players to use a common format
Use correct title for asset players when asset is bound to property access

#jira UE-116472 - Asset players bound via property access incorrectly report that they use asset 'None'
#rb Jurre.deBaare

[CL 16466900 by Thomas Sarkanen in ue5-main branch]
2021-05-26 07:53:28 -04:00
Thomas Sarkanen
d411e1b010 Fixed unloaded assets in asset players not showing up in anim BP context menus
Unified the approach to gathering assets and spawning nodes from them. Previously each had its own slightly unique code doing similar things.
Note that with this change it is now possible to directly spawn 'evaluator' style nodes from the context menu instead of relying on a context menu conversion step.
Also tweaked icons, tooltips and titles for consistency

#rb Jurre.deBaare

[CL 16434364 by Thomas Sarkanen in ue5-main branch]
2021-05-24 06:45:16 -04:00
Thomas Sarkanen
27a6f84b12 Fix crash in cooked games with standalone asset players
Also fix blendspace sync groups not working correctly

#rb Timothy.Daoust
#jira FROST-2365

[CL 16105948 by Thomas Sarkanen in ue5-main branch]
2021-04-23 15:31:02 -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