Commit Graph

235 Commits

Author SHA1 Message Date
mike zyracki
0394dcc8b8 Sequencer: Animation Layers: Merging layers work with Overrides, Passthrough action to key the value under the Overide layer, various misc fixes.
#jira UE-170495
#rb Max.Chen

[CL 36409625 by mike zyracki in 5.5 branch]
2024-09-18 16:50:23 -04:00
mike zyracki
d755798e61 Sequencer: Anim Layers
Anim layers are editor only asset user data attached to a level sequence that's shown from the animation toolbar. Consist of a set of sections and their corresponding owners(control rig/object) with various properties(mute, layer weight, etc.). Note since some of these values may get set in sequencer we poll some of these properties, using caching as needed.

For control rig we have an idea of multiple sections to key, since we need to have that per control e.g. left arm in left arm section/layer, right arm in right arm section/layer, everything else in base layer.

Weight track for the anim layers shows if it's keyed or not so I reuse control rig editor to cache that data which it also does for anim details proxies.

Move SCollapseControlsWidget to track editor header so it can be shared.

Sections in layers/with overrides can have a Blending Order, this will talked about more in the override code review.

Have a couple todo's in particurly when recompiling control rigs that are in layers

#rb max.chen
#jira UE-170495

[CL 36162829 by mike zyracki in 5.5 branch]
2024-09-10 18:32:22 -04:00
derek ehrman
db68fbca9a [Backout] - CL36143365
[FYI] Mike.Zyracki
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL36140878
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL36140272
[FYI] Mike.Zyracki
Original CL Desc
-----------------------------------------------------------------
Anim layers are editor only asset user data attached to a level sequence that's shown from the animation toolbar. Consist of a set of sections and their corresponding owners(control rig/object) with various properties(mute, layer weight, etc.). Note since some of these values may get set in sequencer we poll some of these properties, using caching as needed.

For control rig we have an idea of multiple sections to key, since we need to have that per control e.g. left arm in left arm section/layer, right arm in right arm section/layer, everything else in base layer.

Weight track for the anim layers shows if it's keyed or not so I reuse control rig editor to cache that data which it also does for anim details proxies.

Move SCollapseControlsWidget to track editor header so it can be shared.

Sections in layers/with overrides can have a Blending Order, this will talked about more in the override code review.

Have a couple todo's in particurly when recompiling control rigs that are in layers

#rb max.chen
#jira UE-170495

[CL 36155532 by derek ehrman in 5.5 branch]
2024-09-10 14:10:23 -04:00
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
max chen
6e3a1d797e Sequencer: Fix can split/trim so that it only returns true if the resulting section is not empty.
#jira UE-208169
#rb Andrew.Rodham

[CL 35430922 by max chen in ue5-main branch]
2024-08-09 14:20:44 -04:00
max chen
5d550f8083 Sequencer: Fix parsing of shot name so that it takes into account the number of characters for the take separator.
Previously, the take separator was limited to a single character and parsing the take number was limited to a single character. This now properly allows for multiple characters. For example, if the take separator is "_tk", "myshot_tk001" will parse "001" as the take number. Previously, it would get stuck trying to parse "tk001".

#jira UE-219642
#rb david.bromberg

[CL 35109999 by max chen in ue5-main branch]
2024-07-26 11:26:15 -04:00
david bromberg
8877bea153 Sequencer- Fix bug with FSpawnableRestoreState- it was assuming spawnables had Lifetime Binding Tracks, but they can instead have spawn tracks. This was causing an issue with the Animation Browser.
#rb ludovic.chabant, Mike.Zyracki

[CL 34977100 by david bromberg in ue5-main branch]
2024-07-22 03:59:50 -04:00
andrew rodham
927c5d41b3 Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:

Core machinery:
 - FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
 - FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
 - The following interpolation types have been added/improved to add Derivative and Integral functionality
   * FConstantValue: Represents a curve of the form y=c
   * FLinearInterpolation: Represents a curve of the form y=mx + c
   * FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
   * FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
   * FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
   * FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
 - FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
 - FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
 - FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time

Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
  * Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
  * This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
  * Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.

Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type

#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen

[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
bob tellez
8f0b1893d7 #UE Provide the asset reference filter information about which referencers are editor only
[CL 34450959 by bob tellez in ue5-main branch]
2024-06-18 00:27:04 -04:00
mike zyracki
6bf526007b Sequencer: Linked Anim Sequences. Allow ability to specify custom range when saving out custom time range.
#rb Maksym.Zhuravlov

[CL 34387226 by mike zyracki in ue5-main branch]
2024-06-14 18:35:10 -04:00
mike zyracki
4ebd44033b Sequencer: Control Rig: Fix collapsing sections when there are no absoluate sections.
#jira UE-217506
#rb max.chen

[CL 34312120 by mike zyracki in ue5-main branch]
2024-06-12 12:32:47 -04:00
max chen
217b1893c7 Sequencer: Remove deprecations (5.1, 5.2)
Removed a lot of the deprecated notions of 'master' and also removed the exceptions in CheckUnacceptableWords!

#rb Andrew.Rodham
#rnx

[CL 33051637 by max chen in ue5-main branch]
2024-04-17 18:09:34 -04:00
mike zyracki
7a1129b26b Sequencer: Spawnable restore deconstructor speculative fix, part 2.
#rb Max.Chen

[CL 32777513 by mike zyracki in ue5-main branch]
2024-04-05 18:55:26 -04:00
mike zyracki
8ffbe178f5 Sequencer: Spawnable restore deconstructor speculative fix.
#rb Max.Chen

[CL 32735691 by mike zyracki in ue5-main branch]
2024-04-04 14:06:01 -04:00
mike zyracki
629994182a Sequencer: Animation Baking in subsequences would get the incorrect time range. Need both root/current movie scene sequence to get the range stored in the subsequence data. Had to combine the two reviews since of overlapping changes and P4 suckage at handling this, plus issues with preflights. Fixed issues brought up in the reviews in particually moved sequence parameters over to one struct and made sure all deprecrated functions call the new ones.
#rb max.chen
#jira UE-210054

[CL 32532108 by mike zyracki in ue5-main branch]
2024-03-26 19:50:55 -04:00
mike zyracki
5a8ad61267 Sequencer: Control Rig: Make sure when collapsing by key the key is in section range
#jira UE-209597
#rb Max.Chen

[CL 32249559 by mike zyracki in ue5-main branch]
2024-03-14 13:01:26 -04:00
david bromberg
03f40c55f1 Sequencer- Refactor Bindings to support inherited Custom Bindings.
With this checkin, the binding system inside Level Sequences has been refactored to allow C++ custom binding classes inheriting from a new class, UMovieSceneCustomBinding. Custom bindings are held as instanced UObjects inside FMovieSceneBindingReference, alongside the Universal Object Locator. In the case where a custom binding has been specified, the UOL will be ignored.
The intention with this change is to allow developers to create their own arbitrary methods of binding any UObject to a track inside Sequencer. Examples of this include:
* Runtime dynamic bindings to spawned NPC or player characters (e.g. in UEFN) with a different spawned preview character
* Blueprint-specified dynamic bindings
* Spawnable bindings based on something other than a AActor template
* Scene Graph/Prefabs

Alongside the base UMovieSceneCustomBinding class, a new hierarchy of spawnable custom binding classes has been created as the basis for allowing spawnable bindings that don't require object templates, and may instead require other asset references, for example UEFN NPC character spawnables requiring an NPC Character Definition asset.
This hierarchy is currently. UMovieSceneCustomBinding <- UMovieSceneSpawnableBindingBase <- UMovieSceneSpawnableActorBindingBase <- UMovieSceneSpawnableActorBinding.
This hierarchy allows for spawnables of non-actor types, spawnables of actor types not based on templates, and finally UMovieSceneSpawnableActorBinding, which is a re-implementation of FMovieSceneSpawnable inside the custom binding system.
Going forward, we will be moving to deprecate FMovieSceneSpawnable in UE Sequencer in favor of the custom spawnable binding types. Sequences with FMovieSceneSpawnables will continue to function as normal, but new spawnables in new sequences will use UMovieSceneSpawnableActorBinding under the hood. These will technically have FMovieScenePossessable structs created for them for now rather than FMovieSceneSpawnable structs. This should be mostly invisible to the user.

In addition, I've added a separate hierarchy of custom bindings called 'Replaceable' bindings. A 'Replaceable' is a binding type that will expect in runtime to always be overridden by a different object that may not be available in editor. UMovieSceneReplaceableBinding will hold in EDITORONLY_DATA a UMovieSceneSpawnableBindingBase to provide a preview while within Sequencer. Included in this is a UMovieSceneReplaceableActorBinding, which uses the UMovieSceneSpawnableActorBinding internally to spawn its preview, and has no implementation to find the actor during runtime- it relies on the user overriding the actor binding using the existing BindingOverrides method on LevelSequenceActor.

Next Steps:
* UEFN custom bindings will be built upon this system, to allow UEFN users multiple ways to override bindings.
* UEFN custom spawnable bindings will be built upon this system, to allow UEFN users a way to spawn actors and objects within Sequencer with their lifetime managed by Sequencer
* With this change, we have a cleaner way of incorporating the 'dynamic binding' work that uses the Director Blueprint to create a spawnable or possessable. This should be incorporated into the UCustomBinding hierarchy.
* Once Verse supports it, we should add Verse custom binding logic
* We need to add a Universal Object Locator type that can reference any other binding in the sequence hierarchy. This will allow us to adapt the existing 'Spawnable Parent' possessable binding logic to reference any other type of binding, not just spawnable ones.
* Eventually we will fully deprecate FMovieSceneSpawnable

Further notes:
* A previous imagined version of this system used the cache as a way to allow locators to spawn actors and register them with Sequencer. This change removes this code.
* Custom Spawnable Bindings use the Binding Lifetime Track to determine their spawn lifetime rather than the old spawn track. This unifies the concept of the lifetime of an object binding within sequencer for both spawnables and possessables.
* As FMovieScenePossessable and FMovieSceneBindingReferences allows multiple bindings per guid, this change now allows multiple spawnables to be spawned and controlled by a single binding track. However, some of the editor tooling code doesn't currently handle this properly and at times assumes a single binding. This should be resolved one way or the other.
* The UX for this allows UCustomBindings to handle creating bindings from any dragged in object using a priority system- Sequencer will ask all classes in priority order if they support binding creation from that object.
* The UX supports unique overlay icons and tooltips for different types of bindings
* The UX allows each binding type to decide whether it can convert a current binding into its own type and then do so
* Currently there is some manual instanced detail customization for UMovieSceneCustomSpawnableActorBinding. We use instanced customization so that the UX has the sequencer context. This should both be improved (to allow ways to choose a class/template via this UI), as well as extended so that clients outside of the Movie Scene plugin can register instanced detail customizations for their own binding types.
* Where possible, Sequencer APIs around spawnables have been refactored to take guids rather than FMovieSceneSpawnable references. In particular, custom spawnables do still use the spawn register, but do not use actor spawners- instead the UMovieSceneCustomBinding class is given the responsiblity of spawning/destroying the object/actor. This created an awkward API for USD export, which had overridden the spawn register to unhide/hide actors rather than spawning/destroying them. This could use some more work. MetaHumanPerformanceExportUtils will also need to be refactored at some point to use the custom spawnable binding system.
* FSequencerUtilities::CreateBinding and CreateGenericBinding has been refactored to accept binding parameters and now supports creating custom bindings including spawnables, as well as replacing existing bindings and adding additional bindings to an existing guid.

[REVIEW] [at]ue-sequencer
#jira UE-199299, FORT-582815, UE-209594

#rb Andrew.Rodham, daniel.coelho, Max.Chen

[CL 32218187 by david bromberg in ue5-main branch]
2024-03-13 12:48:46 -04:00
max chen
360dbdfb06 Sequencer: Fix CanTrimSectionLeft, CanTrimSectionRight, CanSplitSection so that you can't end up with empty sections
#jira UE-208169
#rb ludovic.chabant

[CL 32170518 by max chen in ue5-main branch]
2024-03-11 20:58:17 -04:00
max chen
d0eb839a07 Sequencer: Fix import fbx replace transform not being set properly.
The settings are temporarily changed to the settings passed into the function. bReplaceTransformTrack was missing from the copy.

#rb austin.crismore, mike.zyracki
#jira UE-207269

[CL 31666881 by max chen in ue5-main branch]
2024-02-20 20:22:01 -05:00
mike zyracki
9d28953d13 Sequencer: Constraints working with snapper. Fix getting actor transforms, can't rely on the old interragator that only evaluates the transform track, not any attachments or constraints, etc.. so need to go evaluate everything when getting transforms. Also when setting the transform make sure it's in the right space taking into account the constraint space.
#jira UE-199514
#rb benoit.gadreau

[CL 31389912 by mike zyracki in ue5-main branch]
2024-02-12 13:07:22 -05:00
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
max chen
35eeae9c78 Sequencer: Additional GetPlaybackContext fixes
#rb andrew.rodham, ludovic.chabant
#rnx
#jira UE-201421

[CL 29997080 by max chen in ue5-main branch]
2023-11-29 15:17:36 -05:00
max chen
63ca9003e3 Sequencer: Null check when locking camera to viewport and ther is no active viewport.
#jira UE-201007
#rb ludovic.chabant

[CL 29964052 by max chen in ue5-main branch]
2023-11-28 13:10:18 -05:00
mike zyracki
42f30d4604 Sequencer: Snapping: Constriants: Perform Euler filter when snapping/compensation static meshes
#jira UE-200411
#rb mike.zyracki

[CL 29756052 by mike zyracki in ue5-main branch]
2023-11-15 14:56:33 -05:00
ludovic chabant
bb5b082fb1 Sequencer: move evaluation information onto FSharedPlaybackState
This is another step in the broader refactor to remove IMovieScenePlayer from the core evaluation code. This step moves some of the main evaluation information from the player and its root evaluation template instance, to the shared playback state.

With this knowledge, FSharedPlaybackState, FSequenceInstance, and a few other classes have access to basic things like the linker, runner, and more, so this change removes the need to pass these pointers into many methods. We do however still need to pass the player into a few places because the creation and initialization of sequence instances needs to execute some binding-related logic in a careful order. This will be further cleaned-up in a follow-up change when we move object caches and binidng overrides out of the player class.
#rb andrew.rodham
#jira UE-199666

[CL 29410139 by ludovic chabant in ue5-main branch]
2023-11-03 12:31:53 -04:00