Commit Graph

27 Commits

Author SHA1 Message Date
Marc Audy
de2c3cb8e0 [Backout] - CL20593017, 20594056, 20625634, 20645670, 20649179, 20649223, 20649380, 20658535
Add new custom version to specify a certain window of AnimSequences are not loadable
#fyi Jurre.deBaare
#robomerge EngineMerge
Original CL Desc
-----------------------------------------------------------------
**New**
- Engine
	- IAnimationDataModel interface
- AnimationData plugin
	- AnimSequencerDataModel, sequencer based implementation of IAnimationDataModel
	- AnimSequencerDataController, controller for above (implementation of IAnimationDataController)
- Added FCompressedRichCurve::PopulateCurve, allowing users to convert back to a FRichCurve for validation/debugging
- Added DefaultFrameRate to AnimationSettings, this replaces the hardcoded 30FPS in code
- Added ::GetKeyIndicesFromTime which takes FFrameRate
- Added AnimSequenceBase::OnAnimModelLoaded, this is required for correct postloading behaviour of data model (specifically AnimSequencerDataModel, as it depends on data from its outer ? anim sequence)
- Added IAnimationDataModel ::Evaluate which now takes responsibility for evaluating raw animation bone, curve and attribute data. And moved all trackbased evaluation code into AnimDataModel.cpp
- Added a.ForceEvalRawData allowing to force evaluation of source data
- Added a.SkipDDC to force compressing animation data locally

**Changed**
- Reparent UAnimDataModel to IAnimationDataModel interface, and rejig behaviour
- AnimSequenceBase now reference AnimDataModel as IAnimationDataModel
- Upgrade path for legacy to IAnimationDataModel and existing UAnimDataModel to IAnimationDataModel through IAnimationDataController::PopulateWithExisting
- IAnimationDataModel data is now frame(number/rate/time) based rather than seconds/keyindices. This enforces frameborder aligned data from now on.
- Moved RichCurve evaluation code from RichCurve.cpp to separate file and consolidated all instances of copy-pasta behaviour
- Updated/removed deprecated EngineTests around AnimSequences
- Changed many instances to use a FFrameTime together with a known FFrameRate versus seconds and sequencelength in float involving frame \/ time calculations (including instances of FAnimKeyHelper)
- Switched anim sequence evaluation to use double in Extraction context for time value and patched up places with static\_cast\<double\>
- FRichCurve::Eval
	- Make sure we always evaluate keys when T >= Key0.Time and T <= KeyN.Time to deal with crazy userweighted tangents
- Fixed WeightedKeyDataAdapter::GetKeyInterpMode/GetKeyTangentWeightMode retrieving invalid values, as it was indexing according to KeyIndex rather than KeyIndex\*2. This made it so that values were misinterpreted.
- Fixed WeightedEvalForTwoKeys for compressed data retrieving GetKeyInterpMode and GetKeyTangentWeightMode using the wrong index value. As they are not indexed using KeyDataHandle type.
- Fixed issue where compression could crash when containing zero-key scale additivebase track (tries to retrieve)
- Replaced instances of NULL with nullptr
- Moved required decompression information into FAnimSequenceDecompressionContext and reimplemented decompression within UE::Anim::Decompression namespace and new file
- Deprecated ::GetRawDataGuid and replaced with GetDataModel()->GenerateGuid()
- Fixed UAnimStreamable evaluation/compression (previously broken with MVC refactor)
- Updated Animation exporting pipeline to be frame-based rather than seconds
- Deprecated RetargetPose, replaced with FRetargetingScope (used within AnimModel::Evaluate)
- Fixed BaseAdditiveAnimation array become invalid/incorrect when removing zero-additve tracks during compression
- Updated EngineTest animation sequence related tests to new APIs (while maintaining deprecated path testing as well for now)
- AnimDataController / Animation Sequence tests now generate a USkeleton for the transient animation sequence (used to perform the test on)

**Removed**
- Unused file/class AnimData/AnimDataNotifyCollector.h

#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Mike.Zyracki
#jira UE-131296
#preflight 62a308a8b0150a87f9d6891b

[CL 20677979 by Marc Audy in ue5-main branch]
2022-06-15 18:24:46 -04:00
Jurre deBaare
e13fdba72c **New**
- Engine
	- IAnimationDataModel interface
- AnimationData plugin
	- AnimSequencerDataModel, sequencer based implementation of IAnimationDataModel
	- AnimSequencerDataController, controller for above (implementation of IAnimationDataController)
- Added FCompressedRichCurve::PopulateCurve, allowing users to convert back to a FRichCurve for validation/debugging
- Added DefaultFrameRate to AnimationSettings, this replaces the hardcoded 30FPS in code
- Added ::GetKeyIndicesFromTime which takes FFrameRate
- Added AnimSequenceBase::OnAnimModelLoaded, this is required for correct postloading behaviour of data model (specifically AnimSequencerDataModel, as it depends on data from its outer ? anim sequence)
- Added IAnimationDataModel ::Evaluate which now takes responsibility for evaluating raw animation bone, curve and attribute data. And moved all trackbased evaluation code into AnimDataModel.cpp
- Added a.ForceEvalRawData allowing to force evaluation of source data
- Added a.SkipDDC to force compressing animation data locally

**Changed**
- Reparent UAnimDataModel to IAnimationDataModel interface, and rejig behaviour
- AnimSequenceBase now reference AnimDataModel as IAnimationDataModel
- Upgrade path for legacy to IAnimationDataModel and existing UAnimDataModel to IAnimationDataModel through IAnimationDataController::PopulateWithExisting
- IAnimationDataModel data is now frame(number/rate/time) based rather than seconds/keyindices. This enforces frameborder aligned data from now on.
- Moved RichCurve evaluation code from RichCurve.cpp to separate file and consolidated all instances of copy-pasta behaviour
- Updated/removed deprecated EngineTests around AnimSequences
- Changed many instances to use a FFrameTime together with a known FFrameRate versus seconds and sequencelength in float involving frame \/ time calculations (including instances of FAnimKeyHelper)
- Switched anim sequence evaluation to use double in Extraction context for time value and patched up places with static\_cast\<double\>
- FRichCurve::Eval
	- Make sure we always evaluate keys when T >= Key0.Time and T <= KeyN.Time to deal with crazy userweighted tangents
- Fixed WeightedKeyDataAdapter::GetKeyInterpMode/GetKeyTangentWeightMode retrieving invalid values, as it was indexing according to KeyIndex rather than KeyIndex\*2. This made it so that values were misinterpreted.
- Fixed WeightedEvalForTwoKeys for compressed data retrieving GetKeyInterpMode and GetKeyTangentWeightMode using the wrong index value. As they are not indexed using KeyDataHandle type.
- Fixed issue where compression could crash when containing zero-key scale additivebase track (tries to retrieve)
- Replaced instances of NULL with nullptr
- Moved required decompression information into FAnimSequenceDecompressionContext and reimplemented decompression within UE::Anim::Decompression namespace and new file
- Deprecated ::GetRawDataGuid and replaced with GetDataModel()->GenerateGuid()
- Fixed UAnimStreamable evaluation/compression (previously broken with MVC refactor)
- Updated Animation exporting pipeline to be frame-based rather than seconds
- Deprecated RetargetPose, replaced with FRetargetingScope (used within AnimModel::Evaluate)
- Fixed BaseAdditiveAnimation array become invalid/incorrect when removing zero-additve tracks during compression
- Updated EngineTest animation sequence related tests to new APIs (while maintaining deprecated path testing as well for now)
- AnimDataController / Animation Sequence tests now generate a USkeleton for the transient animation sequence (used to perform the test on)

**Removed**
- Unused file/class AnimData/AnimDataNotifyCollector.h

#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Mike.Zyracki
#jira UE-131296
#preflight 62a308a8b0150a87f9d6891b

[CL 20593017 by Jurre deBaare in ue5-main branch]
2022-06-10 06:24:32 -04:00
Jurre deBaare
4c51bac40d UE5/Release-5.1 - Duplicated keys for localization - UE - Anim
#jira UE-150815
#rb trivial
#preflight 6284d86ef239239af676a70f

[CL 20259117 by Jurre deBaare in ue5-main branch]
2022-05-18 07:36:32 -04:00
frederick lupien
e747e2d057 Add GetMontageSlotNames to AnimationBlueprintLibrary to retrieve the name of all slots used by a given montage
#rb Jurre.deBaare

#ROBOMERGE-AUTHOR: frederick.lupien
#ROBOMERGE-SOURCE: CL 20058271 via CL 20058292 via CL 20058302
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20061208 by frederick lupien in ue5-main branch]
2022-05-05 14:10:40 -04:00
Jurre deBaare
7fffdecb0e 5.0 deprecated functionality removal from AnimSequence(Base) and AnimDataModel
#jira none
#rb Thomas.Sarkanen
#preflight 625566fc3f5641db59efc016

[CL 19718928 by Jurre deBaare in ue5-main branch]
2022-04-12 08:00:50 -04:00
Jurre deBaare
da85ae3f1c AnimPose API improvements
- Add evaluating / retrieving of curve values from pose
- Add ability to retrieve Additive animation as full-pose (base + additive) or just additive
- Add ability to retrieve set of poses, evaluated at provided equal set of time intervals
#rb Thomas.Sarkanen
#jira none
#preflight 624da4b6bd5b36eec325a12f

[CL 19647633 by Jurre deBaare in ue5-main branch]
2022-04-06 10:45:20 -04:00
jonathan adamczewski
aaa222342a fixes for non-pch, non-unity build
#jira none
#trivial
#rnx
#preflight 624b167b292f228e094aa31a

[CL 19610582 by jonathan adamczewski in ue5-main branch]
2022-04-04 12:18:34 -04:00
Jurre deBaare
eeceb102db Added uniform blueprint nodes for adding/updating of Animation Attribute (data)
- Expose built in attribute type properties to blueprints/scripting
#jira none
#rb Thomas.Sarkanen
#preflight 6246c9a2dc6183e3f5170675

[CL 19586053 by Jurre deBaare in ue5-main branch]
2022-04-01 06:09:36 -04:00
marc audy
0731f43da6 Fix Linux build due to use of inline function GetAnimBlueprint
[CODEREVIEW] Jurre.deBaare
#rnx

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-COMMAND: FNMain
#ROBOMERGE-SOURCE: CL 19432069 in //UE5/Release-Engine-Staging/...
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19432599 by marc audy in ue5-main branch]
2022-03-18 02:35:56 -04:00
jurre debaare
ca75472a6c #feature added script exposed AddNodeAssetOverride function, allowing users to set Animation Asset overrides through Blueprints/Python
#rb Thomas.Sarkanen
#preflight 623315486c05dd6bbc7d0bd5

#ROBOMERGE-OWNER: jurre.debaare
#ROBOMERGE-AUTHOR: jurre.debaare
#ROBOMERGE-SOURCE: CL 19419387 via CL 19419414 via CL 19421349 via CL 19429039 via CL 19429170
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19432568 by jurre debaare in ue5-main branch]
2022-03-18 02:33:13 -04:00
kiaran ritchie
91793932a8 Fixing crash when exporting animation in retargeter.
#JIRA:https://jira.it.epicgames.com/browse/UE-143028
#rb:halfdan.ingvarsson
#preflight:https://horde.devtools.epicgames.com/job/620d7fb77948a1e5e4c2a520

#ROBOMERGE-AUTHOR: kiaran.ritchie
#ROBOMERGE-SOURCE: CL 19079231 in //UE5/Release-5.0/... via CL 19094758
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19137217 by kiaran ritchie in ue5-main branch]
2022-02-24 20:51:27 -05:00
matt johnson
4fd3699e7d AnimationBlueprintLibrary: add function for evaluating the subframe timecode attribute
Since the subframe component of FFrameTime is clamped to the range [0.0, 1.0),
it cannot accurately represent the use case where the timecode metadata represents
subframe values as whole numbered subframes instead of as a percentage of a frame
the way the engine does. The subframe component of the FQualifiedFrameTime returned
by EvaluateRootBoneTimecodeAttributesAtTime() may not reflect the authored subframe
metadata in that case.

This new function allows access to the subframe values that were actually authored in the
timecode metadata.

An additional explicit clamp was added to EvaluateRootBoneTimecodeAttributesAtTime()
to ensure that the subframe value read from the timecode metadata is in range *before*
we try to construct an FFrameTime from it, since the constructor has a checkSlow() that
will assert if the value is out of range.

#jira UE-141224
#rb max.chen
#preflight 620ffdcead11de9431ce8cc5

[CL 19060425 by matt johnson in ue5-main branch]
2022-02-18 19:47:57 -05:00
kiaran ritchie
926a4292db Fixed bug, exported retarget produces different results than editor preview.
#JIRA:https://jira.it.epicgames.com/browse/UE-142160
#rb:halfdan.ingvarsson
#preflight:https://horde.devtools.epicgames.com/job/620ad57e803d9066e68f84dd

#ROBOMERGE-AUTHOR: kiaran.ritchie
#ROBOMERGE-SOURCE: CL 18998188 in //UE5/Release-5.0/... via CL 18998680 via CL 18999001
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 19001757 by kiaran ritchie in ue5-main branch]
2022-02-15 15:05:13 -05:00
matt johnson
da28fed981 AnimationBlueprintLibrary: add support for evaluating string-typed timecode custom attributes and timecode rates
This extends the handling in EvaluateRootBoneTimecodeAttributesAtTime() to support reading
numerical values from string-typed custom attributes for any of the existing components of
FTimecode or a subframe value.

It also adds support for parsing a timecode rate string into the FFrameRate it represents,
and accounts for the use of drop frame timecode rates (with either "29.97df" for NTSC_30
or "59.94df" for NTSC_60 frame rates).

#rb max.chen
#preflight 61ef2029ca3de856bcdb2a42

#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18715500 in //UE5/Release-5.0/... via CL 18715569 via CL 18715728
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18717033 by matt johnson in ue5-main branch]
2022-01-24 18:58:39 -05:00
matt johnson
b842f67db7 Animation: add "TCRate" timecode custom attribute for specifying the timecode rate
In some workflows when authoring timecode metadata, the timecode rate may be
different from the animation or capture frame rate, for example when capturing
"high" frame rate data at 120 frames per second but recording SMPTE timecode
at 30 frames per second.

This adds a "TCRate" custom attribute setting that allows authoring metadata that
specifies a timecode rate that is different from the animation data frame rate.

With this initial introduction of the new setting, the custom attribute is expected to
be integer or float typed and should represent the timecode rate in frames per second.
Drop frame is not yet supported.

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

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

[CL 18551341 by matt johnson in ue5-release-engine-test branch]
2022-01-07 17:16:14 -05:00
benoit gadreau
62444fb000 changed transform functions to return const references
#rb jurre.debaare
#jira none
#preflight 61d46fd91a3fd09dcbc70f2b

#ROBOMERGE-AUTHOR: benoit.gadreau
#ROBOMERGE-SOURCE: CL 18508342 in //UE5/Release-5.0/... via CL 18508375
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18508395 by benoit gadreau in ue5-release-engine-test branch]
2022-01-04 11:25:06 -05:00
matt johnson
c2a816c861 AnimationBlueprintLibrary: add function for evaluating timecode attributes for the root bone in an anim sequence
A specially designated set of attribute curves can be authored on a bone
to encode timecode metadata for an animation sequence. Each attribute
encodes a different component of a complete timecode and subframe value
("TCHour", "TCMinute", "TCSecond", "TCFrame", and "TCSubframe"). The
convention is to author these attribute curves on the root bone of the animation.

This adds a function for evaluating those attributes at a particular time, and the result
is returned as a qualified frame time. If the anim sequence has an import file frame rate
specified, then that rate is used for the returned qualified frame time to more closely
match the original source of the animation. Otherwise, the sampling frame rate of the
anim sequence is used. If the root bone does not have any timecode attributes or they
otherwise cannot be evaluated (for example, because they have no keys), the function
returns false, and the qualified frame time passed by reference is unmodified.

Finally, this new function is used for the frame time hint of skeletal animation tracks in
Sequencer. Anim sequences that have these attributes authored will show the authored
timecode/frame values in the frame time hint when they are selected. This enables more
easily correlating a point in time in the anim sequence with where it came from in an
external DCC.

#rb benoit.deschenes, max.chen
#preflight 619d6f48aa4521f9e7a4e183

#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18316998 in //UE5/Release-5.0/... via CL 18317391
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18317981 by matt johnson in ue5-release-engine-test branch]
2021-11-29 18:04:19 -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
danny chapman
7db4f3162f Fix for BlendSpace analysis fails with additive animations (code from Jurre)
#jira UE-125920
#rb jurre.debaare,danny.chapman

#ROBOMERGE-AUTHOR: danny.chapman
#ROBOMERGE-SOURCE: CL 17442480 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17442486 by danny chapman in ue5-release-engine-test branch]
2021-09-07 05:02:01 -04:00
jurre debaare
fab69e6d08 Ported project specific scriptability UFunctions to Engine:
- SetPreviewSkeletalMesh to UAnimationAsset and UAnimBlueprint
- Functionality to retrieve UAnimationGraphs and UAnimationGraphNodes of a specific class from UAnimBlueprint and UAnimationGraph respectively
- Functionality for pose driver/asset scripting

#jira UE-117797
#rb Thomas.Sarkanen
#preflight 60d075e32ab218000115936a
#preflight 60d1a3eaa819040001397a52

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

[CL 16741845 by jurre debaare in ue5-release-engine-test branch]
2021-06-22 08:26:20 -04:00
jurre debaare
c20322f681 AnimationBlueprintLibrary::DoesBoneNameExistInternal logic incorrect
#jira UE-99277
#rb Martin.Wilson
#preflight 60cb797b9f12370001325339

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

[CL 16707270 by jurre debaare in ue5-release-engine-test branch]
2021-06-17 14:02:13 -04:00
jurre debaare
a48eb3909f Assert occurs when using Aim Animations from "/All/Game/Animation" folder within a Blend Space Analysis
#jira UE-116722
#fix Actually init BlendedCurve during AnimPose generation/evaluation
#rb Danny.Chapman

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

[CL 16674958 by jurre debaare in ue5-release-engine-test branch]
2021-06-15 12:22:31 -04:00
jurre debaare
4e347824ce User is not prompted to confirm copying anim notifies when some notifies fall outside the range of the destination anim sequence
User is not prompted to delete preexisting anim notifies from destination anim sequence when copying anim notifies from another animation
#fix changed some behaviour around CopyAnimNotifies UFunction
    - Added bool flag allowing for deleting notifies when doing the copy
    - Added log warnings to CopyNotifies, and LogAnimation category to filter when applying Anim Modifiers
#jira UE-68827, UE-68828
#rb Thomas.Sarkanen

#ROBOMERGE-SOURCE: CL 16671828 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v834-16658389)

[CL 16671835 by jurre debaare in ue5-release-engine-test branch]
2021-06-15 07:28:56 -04:00
danny chapman
343371096b Analysis for BlendSpace. Also includes:
Tweaks to the rendering of blendspaces, including separating the graph from the buttons
Context menu changes for the sample details
Changes to AnimationBlueprintLibrary and AnimPose from Jurre to help get the poses during analysis

#jira UE-114512
#rb thomas.sarkanen

#ROBOMERGE-SOURCE: CL 16356830 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16356839 by danny chapman in ue5-release-engine-test branch]
2021-05-17 15:04:09 -04:00
jurre debaare
828c5a6475 Non-unity fixes
#rb trivial
#jira none
#preflight 609c2d4e987ba00001fdbd2b

#ROBOMERGE-SOURCE: CL 16305938 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v800-16297934)

[CL 16305968 by jurre debaare in ue5-release-engine-test branch]
2021-05-12 16:49:24 -04:00