Commit Graph

134 Commits

Author SHA1 Message Date
jurre debaare
c2eb3ee09e Improved precision when converting play-length to frames by using double when testing for subframe value - used to enforce importing animations at frame-boundaries (introduced in CL 20162458)
#rb trivial

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 20178783 via CL 20181537 via CL 20181772 via CL 20181837 via CL 20181880
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20183675 by jurre debaare in ue5-main branch]
2022-05-13 13:25:01 -04:00
jurre debaare
1b7bca9e84 Also test for sub-frame value of _almost_ 1.0 - used to enforce importing animations at frame-boundaries (introduced in CL 20162458)
#rb trivial

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 20167311 via CL 20168773 via CL 20169084 via CL 20169983 via CL 20170300
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20172498 by jurre debaare in ue5-main branch]
2022-05-12 17:49:23 -04:00
jurre debaare
3f5e81059b Increase threshold when comparing calculated frame-time subframe - used to enforce importing animations at frame-boundaries (introduced in CL 20162458)
#rb trivial

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 20165728 via CL 20168104 via CL 20168239 via CL 20168263 via CL 20168276
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20169261 by jurre debaare in ue5-main branch]
2022-05-12 15:35:19 -04:00
jurre debaare
08e2d364b5 Enforce FBX animated import length to be frame aligned as per the import sampling rate
#rb Alexis.Matte
#preflight 627bf70f2d678960301ad6d6

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 20162458 via CL 20162471 via CL 20162485 via CL 20162495
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20162925 by jurre debaare in ue5-main branch]
2022-05-12 06:54:02 -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
Jurre deBaare
51679ba36c FRichCurve::RemoveRedundantKeys has potential to break curve evaluation outside of user-set threshold
* Added Sample frame-rate to RemoveRedundantKeys, this allows FRichCurve to evaluate between the to-be-removed keys to make sure removing does not impact _actual_ evaluated values (rather than just at the point of the removed key)
        + Added RemoveRedundantAutoTangentKeys and deprecation to funnel existing use-cases to switch to new implementation (if desired)
    * Added same behaviour to CurveEditorReduceFilter
#jira UE-148471
#rb Martin.Wilson, Thomas.Sarkanen
#preflight 6255676b153828d273268cf1

[CL 19719002 by Jurre deBaare in ue5-main branch]
2022-04-12 08:14:28 -04:00
jurre debaare
d86cc3c2a5 Added support for importing animation transform attributes from FBX locators
#ushell-cherrypick of 17788334 by David.Bollo
#rb Alexis.Matte
#jira UE-132456
#preflight 61e152ec9010dadd256e6d82

#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 18615971 in //UE5/Release-5.0/... via CL 18615977 via CL 18615985
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18615988 by jurre debaare in ue5-main branch]
2022-01-14 05:58:06 -05:00
matt johnson
951c134eda FBX: add support for importing enum-typed FBX properties as string-typed custom attributes
Enum-typed properties in FBX are converted to string-typed custom attributes using the string
value that corresponds to the enum index.

#rb max.chen, benoit.deschenes
#preflight 61d73f53db0309127d18d024

#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18551188 in //UE5/Release-5.0/... via CL 18551207
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18551230 by matt johnson in ue5-release-engine-test branch]
2022-01-07 17:11:34 -05:00
alexis matte
2ab5c34c4d Fix sequencer curve import that was broken by cl: 17911258.
When the sequencer import curve code was merge with the animsequence import curve code. The issue here was the sequencer was expecting the delta Y value in the rich curve key tangents instead of the derivative like it suppose to be. With this fix the sequencer expect the derivative.

All fbx curve automation test pass with the fix. I can also import correctly both camera track from the jira attachment in sequencer.
#jira UE-135726
#rb mike.zyracki
#rnx
#preflight 61a64b5f0f18b154417d3450

#ROBOMERGE-AUTHOR: alexis.matte
#ROBOMERGE-SOURCE: CL 18325779 in //UE5/Release-5.0/... via CL 18325789
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18325796 by alexis matte in ue5-release-engine-test branch]
2021-11-30 11:35:21 -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
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
john vanderburg
b52b33a3f7 - Fix a precision issues that could result in 24 fps anim sequences being imported as 120 fps.
- Fix precision issue in some of the sampling by changing some calculation and passing in an exact frames per second amount.

[FYI] matt.stoneham, timothy.daoust
#preflight 615c7abc8ebc260001a1e174

#ROBOMERGE-AUTHOR: john.vanderburg
#ROBOMERGE-SOURCE: CL 17724419 in //UE5/Release-5.0/... via CL 17724437
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17724459 by john vanderburg in ue5-release-engine-test branch]
2021-10-05 13:48:42 -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
benoit deschenes
e07fdfa6c1 #jira UE-101813
#rb Alexis.Matte
#ROBOMERGE-OWNER: jeanluc.corenthin
#ROBOMERGE-AUTHOR: benoit.deschenes
#ROBOMERGE-SOURCE: CL 16355304 in //UE4/Release-4.27/... via CL 16355329
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v804-16311228)
#ROBOMERGE-CONFLICT manual-merge

[CL 16367637 by benoit deschenes in ue5-release-engine-staging branch]
2021-05-18 11:03:02 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Jurre deBaare
77f647df00 Reconciling difference between Main and Early-Access w.r.t CL 15851594 to prevent move/edit P4 operations
#jira none
#rb none

[CL 15851764 by Jurre deBaare in ue5-main branch]
2021-03-29 11:47:13 -04:00
jurre debaare
349e585908 - Introduces UInterface for UAnimDataController and moves implementation to new AnimationDataController (editor only) module
- Export curve types entirely for use outside of Engine
- Miscellaneous small fixes from UE5 Main
#rb Thomas.Sarkanen
#preflight 6061973e25b98e00019ea154

#ROBOMERGE-OWNER: jurre.debaare
#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 15849140 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15851594 by jurre debaare in ue5-main branch]
2021-03-29 11:34:31 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Jurre deBaare
2c933f4825 New Animation Attributes system, replacing Custom Attributes:
+ Attribute structures to UAnimDataModel
    * These are sampled/copied into AnimSequence whenever they change
+ Attribute related Notifies and Payloads
+ Controller API and Actions for Attribute related behaviour
+ Type traits (TAttributeTypeTraitsBase) to determine support functionality for user-defined attribute types
+ TAttributeContainer equivalent to TCustomAttributes, used for keeping track of attributes at runtime in a TMap similar fashion
    * Has two exported specializations FStack/Heap-AttributeContainer
+ IAttributeBlendOperator interface used for Attribute related operations in Anim graph
    * Allows for user-defined blending behaviour for their associated types
+ TAttributeBlendOperator providing out-of-the-box blending behaviour for user-defined types
+ FAttributeBlendData helper structure, this encapsulates and abstracts the blend / attribute operations
    * Exposes two iterators, allowing BlendOperator to loop through (type) overlapping Attributes and unique attributes
+ Float/Integer/String Animation Attribute structures used to support legacy TVariant CustomAttribute data types
+ Transform animation attribute structure to add support for single-FTransform based attributes
+ FAnimationAttributeIdentifier identifier used to reference an attribute in a script-friendly manor
+ AttributeTypes static API for registering Attribute types
+ FAttributeCurve providing a curve-type with an Attribute type as its underlying key-value
+ TWrappedAttribute helper structure to wrap end template operate on raw memory (TArray buffer)
+ Added tests for
    * Attribute related controller functionality and actions
    * Attribute curve key reduction
    * Evaluating attributes from AnimSequence
    * Attribute operations (blend, accumulate etc)
    * Functional testing for blendspace attribute evaluation and blending

* Changed default attribute blend type to Blend vs Override
* Updated FBX import/export paths to handle and use new Attribute data structures
* Attribute data is now incorporated into animation source data DDC key
* Deprecated Custom Attributes stored on AnimSequence get converted into their equivalent Attribute structures
* Deprecated all previous CustomAttribute structures, APIs and files
* Corrected some comments in UAnimDataController.h
* Updated existing custom attribute tests to adhere to new blend expectations/behaviour
* Updated AnimSequence resize tests to also incorporate an attribute curve
* Changed layered bone blend to use .5 blend weight vs 1.0 to cover more behaviour
* Added transform attribute used to compare against bone transform during pre-existing functional testing (blended only)

- Deleted CustomAttributes details customization

#rb Thomas.Sarkanen
#fyi kiaran.ritchie, koray.hagen, timothy.daoust

[CL 15568420 by Jurre deBaare in ue5-main branch]
2021-03-02 09:04:09 -04:00
Marc Audy
cac1fe0019 Merge UE5/Release-Engine-Staging @ CL# 15299266 to UE5/Main
This represents UE4/Main @ CL# 15277572

[CL 15299962 by Marc Audy in ue5-main branch]
2021-02-03 14:57:28 -04:00
Jurre deBaare
d5aa6cb0a1 Anim Notifies get clamped to 0.0 when reimporting an FBX
#fix Rather than resetting the entire model remove only the bone animation tracks when (re-)importing an AnimSequence from FBX.
#rb Thomas.Sarkanen

[CL 15128387 by Jurre deBaare in ue5-main branch]
2021-01-18 09:01:19 -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
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00