44 Commits

Author SHA1 Message Date
matt peters
64658cf6ae GetAssetRegistryTags deprecation: Make the old GetAssetRegistryTags and related functions deprecated.
Upgrade the overrides and callsites in all of Epic's code.
Every class that can be subclassed by licensees that has its override change needs to keep the old version of the function as deprecated. Otherwise subclasses that call Super::GetAssetRegistryTags will have a compile error instead of a deprecation warning.
Several classes had their own extension method for GetAssetRegistryTags being passed on to user data classes. Updated all of those to take FAssetRegistryTagsContext just like GetAssetRegistryTags does.
#rnx
#rb Francis.Hurteau

[CL 30224166 by matt peters in ue5-main branch]
2023-12-08 21:45:21 -05:00
roland munguia
8c921bf410 Add support for removing (and optionally also reverting) Animation Modifier(s) from a selection of Anim Sequences in the content browser.
- Added `SRemoveAnimationModifierContentBrowserWindow` widget.
- Added `ShowRemoveAnimationModifierWindow` virtual method to `IAnimationModifiersModule`.
- Added `OnSelectionChanged` delegate to SModifierListView.
- Fixed AnimationModifiersModule not properly unsubscribing its delegates bound to` UObject::FAssetRegistryTag::OnGetExtraObjectTags`.

[RN] minor

[CL 27857700 by roland munguia in ue5-main branch]
2023-09-13 18:50:59 -04:00
jurre debaare
47c25d1798 Add mechanism to ensure AnimationModifiersAssetUserData is always added/part of an AnimSequence, currently it would only be created when opening it in the AnimationEditor
Add script API to AssetUserData interface to check/add user-data (can be used to patch up existing content)
#rb Thomas.Sarkanen, Phillip.Kavan

[CL 27595813 by jurre debaare in ue5-main branch]
2023-09-05 10:22:32 -04:00
euan carmichael
2042b1ace8 Removed experimental tag from UAnimationModifier
#jira UE-192216
#rb Jurre.deBarre

[CL 26905632 by euan carmichael in ue5-main branch]
2023-08-07 19:44:11 -04:00
jamie dale
c6b3e9ee21 Use the FMessageDialog overloads that pass the optional title by-value
#jira
#rb none
#rnx

[CL 25062672 by jamie dale in ue5-main branch]
2023-04-15 20:49:52 -04:00
Jurre deBaare
fb5bc496e0 Fix infinite recursion due to bReapplyPostOwnerChange flag being set on an Anim Modifier instance
#jira none
#rb samuele.rigamonti
#preflight 63ea2a1be92f139c512ff349

[CL 24172726 by Jurre deBaare in ue5-main branch]
2023-02-13 07:21:54 -05:00
Jurre deBaare
458f97b453 Animation Modifier : Improved Error Handling
- Dll Export the FApplyModifiersScope object to allow batch apply modifiers by script (Python or Blueprint Scripted Actions)
- New API to suppress warning or error dialogs when applying modifiers from script
- Fix : 'YesToAll' 'NoToAll' not respected when both error and warning are throwed from same modifier class

Contributed by Yupeng.Zhang

#rb Jurre.deBaare
#preflight 63c539422e714f64add554e5
#jira UE-172660

[CL 23728150 by Jurre deBaare in ue5-main branch]
2023-01-16 07:04:54 -05:00
Jurre deBaare
a5305f76a3 Contributed by Yupeng.Zhang from The Coalition:
Animation Modifier : Fix Modifier on Skeleton
Transfered the ownership of 'PreviouslyAppliedModifier' from an animation modifier instance to the animation sequence being applied.
This solved the following issue:
- Modifier on Skeleton cause USkeleton dirtied everytime the modifier is applied to an animation sequence.
- Modifier on Skeleton cannot be re-apply or reverted correctly.
- CanRevert & OutOfDate status for Modifier on Skeleton was not reflect the true status of all animation sequences referencing that skeleton.

- CurrentAnimSequence/CurrentSkeleton was not set on OnRevert()
- IAnimationDataController::FScopedBracket was not open on OnRevert() before re-apply modifier
- Stateful animation modifier can now be reverted correctly (Applied modifier instance is nolonger reverted after OnApply call)

#preflight 63775e0ff514e1ded99ef095

[CL 23191977 by Jurre deBaare in ue5-main branch]
2022-11-18 05:35:47 -05:00
cbrandtieng
98d904fd1f PR #9136: Adding a setting for animation modifiers to reapply post owner change (Contributed by cbrandtieng)
#rb Thomas.Sarkanen
#preflight 6315e8c8ec45fbf3d7b0dd92

[CL 21791261 by cbrandtieng in ue5-main branch]
2022-09-05 08:28:49 -04:00
bryan sefcik
0837230669 Ran IWYU again on half of the Engine/Source/Editor/... source files.
#jira

[CL 21716414 by bryan sefcik in ue5-main branch]
2022-08-30 23:03:03 -04:00
bryan sefcik
98b51354ed Ran IWYU on Public headers under Engine/Source/Editor/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065253 by bryan.sefcik
#jira
#preflight 62d5b3e91062f2e63014598e

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21152630 via CL 21156388 via CL 21157044
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21181817 by bryan sefcik in ue5-main branch]
2022-07-20 11:56:29 -04:00
aurel cordonnier
34f55d3a4a Merge from Release-Engine-Test @ 17946149 to UE5/Main
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17949667 by aurel cordonnier in ue5-main branch]
2021-10-27 15:14:40 -04:00
Jurre deBaare
635f35f41e Option to apply Animation Modifiers to only new or changed animations
#feature add ability to only apply out-of-date animation modifiers from asset context menu, and through details view on AnimationModifier classes
#fix ensure that we do not apply pending kill modifiers or instances that are used for reverting
#jira UE-84819
#rb Thomas.Sarkanen
#preflight 60cb38fd6092ba000140842e

[CL 16704034 by Jurre deBaare in ue5-main branch]
2021-06-17 09:49:44 -04:00
Jurre deBaare
c261a951cc Feature Request: Apply All for Animations modified by Anim Modifier
#feature added ApplyModifier scope struct which keeps track of which modifier has prompted the user for any warnings, and allow them to YesAll/NoAll rather than having to individually prompt for each modifier/animation sequence combination
#jira UE-82825
#rb Thomas.Sarkanen

[CL 16671774 by Jurre deBaare in ue5-main branch]
2021-06-15 07:23:26 -04:00
Jurre deBaare
a1f73dae73 - Move AnimBlueprintLibrary to its own Module (out of AnimModifiers)
- Added FAnimPose, a script-friendly helper structure to generate/read/write evaluated anim poses
- Added API to populate AnimPose from AnimationSequenceBase, USkeleton (ref pose) and AnimBlueprint

#jira none
#rb Thomas.Sarkanen, Danny.Chapman
#preflight 609bb27f2032ee00016b253a

[CL 16297653 by Jurre deBaare in ue5-main branch]
2021-05-12 07:30:40 -04:00
Jurre deBaare
be38ae281c - Added button to Anim Modifiers details customizations to apply all instances of its class to their outer AnimSequences
- Added context menu entry to AnimationSequence asset actions to apply all contained animation modifiers
#rb Thomas.Sarkanen
#preflight 604f343a23863e000183d66b

[CL 15694950 by Jurre deBaare in ue5-main branch]
2021-03-15 06:52:40 -04:00
Jurre deBaare
bc8e1bb823 - Added GetAnimNotifyEventDuration
- Set duration when replacing AnimNotify states
#jira none
#rb Jaren.Peterson

[CL 15679068 by Jurre deBaare in ue5-main branch]
2021-03-11 14:31:55 -04:00
jurre debaare
40ce4dcefe Expose Montages notifies to python via anim blueprint library like anim sequences already are
#jira UE-90241
#fix changed subset of the AnimationBlueprintLibrary API to take an UAnimSequenceBase/UAnimationAsset instead of an UAnimSequence
#misc added redirectors for all cases

#ROBOMERGE-SOURCE: CL 15558241 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15558273 by jurre debaare in ue5-main branch]
2021-03-01 12:25:45 -04:00
Zousar Shaker
3b4c8fc1c5 Automated wrapped object pointer upgrade for Engine + ShooterGame + ShooterGame referenced plugins
#rb none

[CL 15224650 by Zousar Shaker in ue5-main branch]
2021-01-27 17:40:25 -04:00
Jurre deBaare
fad5503605 Moved SmartName FName arrays local to functions, global static is being initialized to NAME_None due to (new) different AnimModifiers module loading order
#rb Thomas.Sarkanen

[CL 15134972 by Jurre deBaare in ue5-main branch]
2021-01-19 07:57:57 -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
Jurre deBaare
6f3438b57a UAnimSequence:
- Deprecated NumFrames instead added NumberOfKeys (data is copied over during serialization patch up)
- Deprecated GetNumberOfFrames and GetRawNumberOfFrames instead added GetNumberOfSampledKeys
- Deprecated SetRawNumberOfFrames and instead added SetNumberOfSampledKeys
- Added SamplingFrameRate (FFrameRate), which is populated according to the sequence's actual number of frames and length
- Changed some behaviour to use FFrameRate API to calculate frame number / timings
- Deprecated GetFrameRate and instead added GetSamplingFrameRate
- Fixed uses where NumFrames was assumed to contain the number of frames rather than the number of keys (ResizeSequence, AddLoopingInterpolation, CropAnimation, InsertKeysIntoRawData)

UAnimStreamable:
- Deprecated NumFrames instead added NumberOfKeys (data is copied over during serialization patch up)

ITimeManagementModule:
- Exposed GetCommonFrameRates through the abstract interface to get around circular Engine module dependency

#jira UE-102191
#rb Martin.Wilson

[CL 14608938 by Jurre deBaare in ue5-main branch]
2020-10-29 09:47:22 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Lina Halper
44c1bb3292 COPY from //Dev-Anim to //Dev-Main
#rb: none
#fyi: Laurent.Delayen, Thomas.Sarkanen

[CL 11088765 by Lina Halper in Main branch]
2020-01-22 17:58:55 -05:00
ryan durand
627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00