Commit Graph

90 Commits

Author SHA1 Message Date
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
Jurre deBaare
7db755f123 Removed OnStopEditingCurves delegate and behaviour from Persona module, this is now superseded with AnimDataModel notify callbacks instead
#misc fixed use after release crash
#jira none
#rb Thomas.Sarkanen
#preflight 627b8dc9b60dee4a43a33c0f

[CL 20136161 by Jurre deBaare in ue5-main branch]
2022-05-11 07:05:49 -04:00
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
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
thomas sarkanen
3f8fa9692b Converted a number of animation editor menus & toolbars to use tool menus
Also applied asset permissions to various UI sections

#rb Jurre.deBaare,Sara.Schvartzman
#preflight 6267d7dd272f4a558dbcdb6a

#ROBOMERGE-OWNER: thomas.sarkanen
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 19918869 via CL 19921093 via CL 19923159 via CL 19923181
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19926251 by thomas sarkanen in ue5-main branch]
2022-04-26 15:03:55 -04:00
nick brett
7e1eab27e2 [UE][Feature] RBAN Better Debug Draw - 2nd attempt
- Added Debug Visualization of physics bodies and constraints for RBAN nodes in AnimBP editor
- Added checkboxes to filter debug Visualization to Phat skeleton tree
- Created a new PhysicsAssetRenderSettings class that incorporates the debug rendering and filtering settings from Phat
- Created a new PhysicsAssetRenderUtilities namespace that incorporates the debug rendering and filtering code from Phat
- Synchronize debug visualization of physics bodies and constraints between Phat and AnimBP editors

oringinaly submitted as cl-19242421 but failed on non-unity build so backed out

#rb [at]Chris.Caulfield, [at]Thomas.Sarkanen, [at]Cedric.Caillaud
#preflight 6221e57d335298c3145112d1

#ROBOMERGE-OWNER: nick.brett
#ROBOMERGE-AUTHOR: nick.brett
#ROBOMERGE-SOURCE: CL 19283727 via CL 19295417 via CL 19304854 via CL 19304870
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347122 by nick brett in ue5-main branch]
2022-03-10 21:02:14 -05:00
kiaran ritchie
4d8cfcaf85 Attempt #2 with fix to not break projects using EditorAnimUtils::RetargetAnimation()
- Replacing retarget manager with "Retarget Sources"
- Remove right-click retarget features from ABPs, anims and skeletons
- Deprecating URig asset

#rb:halfdan.ingvarsson
#JIRA:UE-137192
[FYI] benoit.gadreau
#preflight:https://horde.devtools.epicgames.com/job/61de1627f33c0754173a0887

#ROBOMERGE-AUTHOR: kiaran.ritchie
#ROBOMERGE-SOURCE: CL 18609946 in //UE5/Release-5.0/... via CL 18609978 via CL 18610008
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18610041 by kiaran ritchie in ue5-main branch]
2022-01-13 18:49:53 -05:00
kiaran ritchie
108d324377 [Backout] - CL18579636
[FYI] kiaran.ritchie
Original CL Desc
-----------------------------------------------------------------
- Replacing retarget manager with "Retarget Sources"
- Remove right-click retarget features from ABPs, anims and skeletons
- Deprecating URig asset

#rb:halfdan.ingvarsson
#JIRA:UE-137192
[FYI] benoit.gadreau
#preflight:https://horde.devtools.epicgames.com/job/61de1627f33c0754173a0887

#ROBOMERGE-AUTHOR: kiaran.ritchie
#ROBOMERGE-SOURCE: CL 18581158 in //UE5/Release-5.0/... via CL 18581164 via CL 18581169
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18581172 by kiaran ritchie in ue5-main branch]
2022-01-11 22:48:53 -05:00
kiaran ritchie
f9bd30d547 - Replacing retarget manager with "Retarget Sources"
- Remove right-click retarget features from ABPs, anims and skeletons
- Deprecating URig asset

#rb:halfdan.ingvarsson
#JIRA:UE-137192
[FYI] benoit.gadreau
#preflight:https://horde.devtools.epicgames.com/job/61de1627f33c0754173a0887

#ROBOMERGE-AUTHOR: kiaran.ritchie
#ROBOMERGE-SOURCE: CL 18579636 in //UE5/Release-5.0/... via CL 18579679 via CL 18579698
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18579719 by kiaran ritchie in ue5-main branch]
2022-01-11 20:22:40 -05:00
jurre debaare
6357c2a154 - Multiple Preview Mesh Set Temporarily toasts can be present at the same time
- Incorrect Preview Mesh can show as selected if the user presses the Apply to Asset button after selection
#jira UE-64834, UE-64830
#fix fade-out any pending Apply Preview Mesh toast when adding a new one
#fix retrieve preview-mesh from preview scene rather than viewed asset
#preflight 61dd92b6cd2cced71056c9a0
#rb Thomas.Sarkanen

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 18572063 in //UE5/Release-5.0/... via CL 18572071
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18572083 by jurre debaare in ue5-release-engine-test branch]
2022-01-11 10:20:00 -05:00
alexis matte
c7fa5eb100 Add section to prioritize sharing the prioritize weight value. This will allow to reduce less a particular section.
#rb david.hill

#ROBOMERGE-AUTHOR: alexis.matte
#ROBOMERGE-SOURCE: CL 18418769 via CL 18418788 via CL 18418808 via CL 18435056 via CL 18437373
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18437648 by alexis matte in ue5-release-engine-test branch]
2021-12-10 20:57:51 -05:00
alexis matte
4ef550e3a2 [Backout] - CL18299908
[FYI] Alexis.Matte
Original CL Desc
-----------------------------------------------------------------
Add section to prioritize sharing the prioritize weight value. This will allow to reduce less a particular section.
#rb david.hill

#ROBOMERGE-AUTHOR: alexis.matte
#ROBOMERGE-SOURCE: CL 18303911 via CL 18303917 via CL 18303919 via CL 18304027 via CL 18304034
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18304035 by alexis matte in ue5-release-engine-test branch]
2021-11-27 12:40:45 -05:00
alexis matte
a412cd4a4b Add section to prioritize sharing the prioritize weight value. This will allow to reduce less a particular section.
#rb david.hill

#ROBOMERGE-AUTHOR: alexis.matte
#ROBOMERGE-SOURCE: CL 18299908 via CL 18301128 via CL 18301171 via CL 18301464 via CL 18301494
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18301520 by alexis matte in ue5-release-engine-test branch]
2021-11-26 14:28:14 -05:00
lucas dower
9d3cb8136b Added 'Pose Watch Manager' and other pose watch improvements
#rb Thomas.Sarkanen
#preflight 619e6b3f0141b3c6da60ae1d
#jira UE-127674

#ROBOMERGE-AUTHOR: lucas.dower
#ROBOMERGE-SOURCE: CL 18285294 in //UE5/Release-5.0/... via CL 18285317
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18285320 by lucas dower in ue5-release-engine-test branch]
2021-11-24 12:24:41 -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
danny chapman
4cab553815 Navigation into/out of Blendspace graphs
#rb thomas.sarkanen
#jira UE-117372

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

[CL 16771411 by danny chapman in ue5-release-engine-test branch]
2021-06-24 08:41:55 -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
danny chapman
ac0d11c360 Removes loading of AnimNotify blueprints from FPersonaModule::StartupModule. Fixes problems loading assets when they're not ready, and also performance problems as a result of loading far more assets than needed at editor startup.
#jira UE-102318
#rb thomas.sarkanen

#ushell-cherrypick of 15342538 by danny.chapman

[CL 15359317 by danny chapman in ue5-main branch]
2021-02-08 15:56:37 -04:00
danny couture
705a98a81c Disable loading of asset at Persona module startup because of major performance regression this code introduce
#rb Matt.Peters

[CL 15325632 by danny couture in ue5-main branch]
2021-02-04 23:28:23 -04:00
danny chapman
429016078e Show the current as well as target preview position in BlendSpaces
#jira UE-107436

[CL 15271911 by danny chapman in ue5-main branch]
2021-02-01 13:01:45 -04:00
Thomas Sarkanen
79c9b00eea Misc BlendSpace 2.0 fixes
Fixed drag/drop of samples in blend space graphs.
Fixed issues around replacing samples and stale anim graph tabs when replacing/deleting samples.
Prevented sample point graph duplication from My Blueprint.
Preserved sync groups when converting from players to graphs.

#jira none
#rb Jurre.deBaare

[CL 15216418 by Thomas Sarkanen in ue5-main branch]
2021-01-27 07:24:02 -04:00
Thomas Sarkanen
5419497f90 BlendSpace 2.0: Blendspace Graph Node
Added a new animation graph node that hosts its own UBlendSpaceBase. Modified UBlendSpaceBase to allow for pose links to be evaluated as the sample points.
The new blend space graphs can be spawned from existing UBlendSpace and UBlendSpace1D assets, or they can be created from scratch, or they can be converted from existing blendspace player nodes via the context menu.

Fixed anim node conversion functions so that their transactions work correctly.

Updated FBlueprintEditorUtils::IsGraphNameUnique to allow it to work with any object as the outer, not just UBlueprint. UBlueprint still has a special case for functions and events. This is to support GenerateUniqueGraphName within a scope (e.g. an outer graph).

Formalized the concept of 'node sub-graphs' (as well as the composite node pattern a little). Previously a number of known node types that contained sub-graphs (e.g. UK2Node_Composite) had special case logic for dealing with node/graph deletion etc. Now  any node can opt into this behaviour via the GetSubGraphs() override.

Added status bar readouts for the blendspace grid, so we dont have to stuff the prompts into the tooltip any more.

Moved anim BP related APIs out of FBlueprintEditor. They are always used via FAnimationBlueprintEditor.

Refactored graph title bar widget creation out into a function to allow other document tab factories to create it.

Altered breadcrumb trail click callbacks and SMyBlueprint::ExecuteAction to always JumpToHyperLink rather than calling OpenDocument directly. This allows unknown (to FBlueprintEditor) document types that reference objects to be correctly jumped to using the breadcrumb trail. Derived asset editors (i.e. FAnimationBlueprintEditor) can intercept the JumpToHyperlink call to ensure that the correct document is presented (i.e. the correct tab payload is generated).

Instead of making yet another bunch of duplicated code for handling the various alpha blend options, refactored this into FAnimGraphNodeAlphaOptions (for editor code) and FAnimNodeAlphaOptions (for runtime code).

Added OnCopyTermDefaultsToDefaultObject for per-node copying of default values from editor node to runtime node, rather than another special-case in the compiler.

#rb Jurre.deBaare,Phillip.Kavan

[CL 15177316 by Thomas Sarkanen in ue5-main branch]
2021-01-25 08:43:19 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Jurre deBaare
f24003f082 Animation data MVC refactor
#jira UE-104234
#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Michael.Zyracki

+ Introduced UAnimDataModel, this currently represents the source data for bone and curve animation. It contains:
    + Bone animation tracks (FBoneAnimationTrack)
        + Key data (coarse)
        + Name
        + Bone tree index
    + Curve data (FAnimationCurveData)
        + Float Curves
        + Transform Curves
    + Play length
    + Sampling rate
        + Used for deriving the expected number of keys/frames when combined with the PlayLength
    + Transient data for supporting backwards compatibility APIs
    + (Dynamic) delegate which broadcasts the mutation Notifies

+ Introduced UAnimDataController, this has sole authority over mutating data contained by UAnimDataModel
    + API functionality allows to transform the contained data in all ways currently expected in the engine.
        + Any mutation will add an undo/redo-able FChange object into the transaction buffer
            + FChangeTransactor helper object allows for keeping track of (compounded) FChange's and inserting them into GUndo
        + Broadcasts change notifies alongside a payload object containing details about the change
            + Interested systems/objects can register to these changes through UAnimDataModel::OnModelModified event
        + Almost all functionality is exposed to both Blueprint and Python scripting
    + Allows for opening 'Brackets', these define the beginning and end of a chain of mutations. Allowing anything registered to OnModelModified to halt responding to the notifies until the (top-level) bracket is closed
    + Undo/redo actions
        + Each mutation to the UAnimDataModel is covered by a 'Action' which is based of FChange and is used to insert a undo/redo-able operation into the transactions buffer

+ Introduced EAnimDataModelNotifType and per-notify payload types. These are used to update views, and any model derived data

+ Introduced FAnimationCurveIdentifier, exposed to scripting, this is used for referencing a curve by name and type when passed to the controller
    + Allows for targetting a specific RichCurve as part of a TransformCurve

+ Introduced FAnimationDataNotifyCollectorused for keeping track of which notifies of type EAnimDataModelNotifType are broadcasted between top-level EAnimDataModelNotifType::BracketOpened and EAnimDataModelNotifType::BracketClosed notifies

+ Added CanTransact to UEngine, returns whether or not a transaction can be made

+ Added UAnimCompositeBase::SetCompositeLength, used for runtime changing of play length value

+ Animation Sequence helpers, containing 'helper' functionality for both AnimSequence and AnimDataModel

* Animation Sequence Base
    + virtual PopulateModel, called during upgrade path for converting existing (legacy) data to the new UAnimDataModel data
    + virtual OnModelModified, registered to the Model's OnModified event to handle any Notifies and payloads
    + Added UAnimDataModel sub-object (editor only)
    + Added UAnimDataController instance (transient and editor only)
    + FAnimationDataNotifyCollector to keep track of model bracketed notifies
    * Deprecated
        * SetSequenceLength()
        * RefreshCurveData()
        * MarkRawDataAsModified()
        * RegisterOnAnimCurvesChanged()
        * UnregisterOnAnimCurvesChanged()
        * UnregisterOnAnimTrackCurvesChanged()
        * RegisterOnAnimTrackCurvesChanged()
        * Public access to RawCurveData

* Animation Sequence
    + Implements PopulateModel/OnModelModified for AnimationSequence related data
    + Added TargetFrameRate, currently locked to the initial sampling rate, but allows for resampling the UAnimDataModel data according to the set rate
    + Added NumberOfSampledKeys (editor only), populated by resampling process
    + Added NumberOfSampledFrames (editor only), populated by resampling process
    + Added ResampledAnimationTrackData (editor only and transient), populated by resampling process
    + Added bBlockCompressionRequests (editor only), used for blocking compression during automation tests
    * Deprecated
        * SetNumberOfSampledKeys()
        * MarkRawDataAsModified()
        * GetRawAnimationData()
        * GetAnimationTrackNames()
        * AddNewRawTrack()
        * GetRawTrackToSkeletonMapTable()
        * GetRawAnimationTrack()
        * GetRawAnimationTrack()
        * UpdateFrameRate()
        * ExtractBoneTransform()
        * CompressRawAnimData()
        * GetSkeletonIndexFromRawDataTrackIndex()
        * RecycleAnimSequence()
        * CleanAnimSequenceForImport()
        * CopyNotifies()
        * PostProcessSequence()
        * AddLoopingInterpolation()
        * RemoveAllTracks()
        * DoesContainTransformCurves()
        * InsertFramesToRawAnimData()
        * CropRawAnimData()
        * RemoveTrack()
        * InsertTrack()
        * ResizeSequence()
        * Non-editor access to GetUncompressedRawSize()
        * Non-editor access to GetApproxRawSize()
        * Public access to UpdateCompressedCurveName()
        * NumberOfKeys
        * SamplingFrameRate
        * TrackToSkeletonMapTable
        * RawAnimationData
        * AnimationTrackNames

* Animation Streamable
    * Model from source Sequence is duplicated rather than copying animation data

* Deprecated ERawCurveTrackTypes::RCT_Vector (marked as hidden)

+ Added automated test for
    + All script exposed controller functionality
    + Undo/redo actions
* Updated existing AnimSequence tests with deprecation and new expected data

+ Base data for compression is now populated from the 'resampled' version stored on the AnimSequence
+ Data cleanup and validation is now performed during compression
    + Track sanitization is now performed during compression (normalizing Quats and clamping near-zero values to zero)
    + Key reduction
    + Invalid track (missing bone from skeleton) removal
    + Curve name validation against skeleton
* Replaced RawCurves with Float curves
* Updated DDC key
- Removed all Guid generation related functionality (now part of the model)

* AnimSequenceBase model registers to AnimModel's notify event, used for refreshing the tracks
    * Replaces the in-place calling of RefreshTracks()
* All curve tracks now hold a const CurveType* rather than a CurveType*/& for introspection of its data
    + Any mutations now go through the controller API
    + Uses AnimationCurveIdentifier to set Transform's per-channel tracks
* RichCurveEditorModelNamed conformed to model/controller
    + Any modifications are applied to an temporary CurveType which always contains a copy of the const-ptr after any previous mutation
    + Registers to the outer AnimModel's notify event, used for updating the cached curve data
    + Registers to CurveModifiedDelegate, used for copying the temp curve data to the model using SetCurveKeys
        * Not-ideal but point that I got to for V1
        * Would be replaced with either refactoring FRichCurve to be MVC like, or by calling UAnimDataController functionality from an implementation of FRichCurveEditorModel

* Mark FChange overrides as final for swap/command change permutations
* Changed FCompoundChange GetDescription to return concatenation of all sub-changes
* Added GetDescription to FTransaction which returns the ToString() value of any contained FChange entries.
    * Entries in SUndoHistory tab now have a ToolTip showing the GetDescription() value
+ FChangeTransactor helper object allows for keeping track of (compounded) FChange's and inserting them into GUndo

* Deprecation handling, conforming code to new APIs and exposing structure/objects/properties to scripting
* Conforming AnimSequence importing from FBX to Model/Controller changes

[CL 15106211 by Jurre deBaare in ue5-main branch]
2021-01-15 06:41:11 -04:00