Level Sequences now use UOLs for their bindings.
Level Sequence player context is now an ALevelSequenceActor if possible.
All bindings (including the extreme-legacy lazy object ptr bindings) are now upgraded to use the UOL binding mechanism.
Introduced a new concept for reasoning about object hierarchies in Sequencer: object schemas. Schemas allow customization of how Sequencer handles finding 'parent' and 'child' objects, which allows us to genericize lots of the hard-coded Actor-Component logic. This is just a first pass - there are still many places that directly deal with AActor and UActorComponent, which will be gradually migrated with upcoming work.
#jira UE-199305
#rb david.bromberg, ludovic.chabant
[CL 29932924 by andrew rodham in ue5-main branch]
This is the third step in the overall refactor to remove the dependency of Sequencer evaluation code on IMovieScenePlayer. It puts most of the spawnables/possessables logic into playback capabilities, so that systems concerned with them can find them there instead of depending on the player interface. In order to do this, many APIs previously taking a player pointer now take a shared playback state reference, which is where they find the playback capabilities.
To keep the changelist to a manageable size, we don't deprecate the previous APIs right away except where we don't have much choice, such as the virtual methods of the spawn register. Everywhere else, passing a player is still a valid call.
Some other APIs have also changed, because the shared playback state structure often gives all the information someone may ever need, and this renders many parameters obsolete. This is for instance the case with sequence updaters.
One aspect of this change that needs to be carefully handled is the initialization and re-initialization of a sequence hierarchy prior to playback. Now that evaluation code relies on playback capabilities, these capabilities need to be added to the sequence hierarchy's shared playback state in a timely manner, and they need to react to changes in the hierarchy. The following changes have therefore been made:
- Playback capabilities can implement callbacks for initialization and for when a new sub-sequence instance is added.
- Sequence instances have a new Initialize method that needs to be called shortly after creation. This is especially needed for root instances, as it gives time for the caller to setup their playback capabilities before finishing the initialization.
Another aspect of this change is that it unearthed a problem with the capability storage, where we could stomp memory and crash while relocating capabilities to make room for a new one. This happened if we did not reallocate a new buffer (i.e. relocating in place). Moving headers could stomp the space of the first couple capabilities before we had a chance to move them. The code now moves things from back to front, first the capabilities, and second the headers.
Finally, this change adds the ability to overwrite a capability with a new value. This is needed for the way the level sequence player initializes itself (see the comment in the code).
The following things have been made into playback capabilities, or have had a new capability interface created around them:
- FMovieSceneEvaluationState, for access into object caches.
- IMovieScenePlaybackClient, for dynamic binding overrides.
- The player index, for retrieving the player interface, if any (mostly for legacy evaluators).
- Notification callbacks for when object bindings change.
- Static binding overrides.
- Storage and management of sequence director blueprints.
Since the player interface is now an optional playback capability, some progress has been made to gracefully handle the case of no such player existing.
#jira UE-199669
#jira UE-199668
#rb Andrew.Rodham
[CL 29895537 by ludovic chabant in ue5-main branch]
The Binding Lifetime track is an optional track that can be added to any object binding. It allows the user to set time range(s) for when the object in question will be bound by Sequencer. Outside of those ranges, the object will be released, and any tracks underneath it will restore state/keep state as set.
Currently this track works for both spawnables and possessables. This track is a precursor to other binding types coming to Sequencer, and in the future this track will allow the user to trigger events as part of the binding activation/deactivation so that changes like AI control for example can be set when binding/unbinding NPC characters or player characters.
As part of this change, it was necessary to clean up some of the sequencer UI color settings on labels, as well as a few changes to the layer bar UI to facilitate a hatch overlay for the sections of the binding tracks that are in a deactivated area.
[REVIEW] [at]ue-sequencer
#jira UE-200088, UE-199857, UE-199299
#rb ludovic.chabant
[CL 29636485 by david bromberg in ue5-main branch]
[FYI] Mike.Zyracki
Original CL Desc
-----------------------------------------------------------------
Sequencer: Linked Anim Instances. Delete links if we can't resolve(by loading) the object referenced.
#jira UE-198720
#rb max.chen
[CL 29212798 by bob tellez in ue5-main branch]
This fixes the UI not updating when calling AddSpawnableFromClass from an Editor Utility Widget
#jira UE-197601
#rb ludovic.chabant
#rnx
[CL 28651047 by max chen in ue5-main branch]
This can happen if a level sequence is re-initialized with a sequence that it was already set to.
#rb max.chen
[CL 28141287 by ludovic chabant in ue5-main branch]
This change tries to address various problems with the camera cut evaluation logic:
- Use the pre-animated state API to properly handle restoring things, instead of doing it partially "by hand". This removes the need for a few hacks like the carry-over of previous view-targets from one sequence to the next.
- Move the code from FSequencer and ULevelSequencePlayer into the track instance (and some related helper classes). Not only does this remove a bit of code duplication, this also lets us take a first step towards removing the dependency of evaluation code on the player API.
#rb max.chen
#jira UE-194692
[CL 28093600 by ludovic chabant in ue5-main branch]
This was because calling GetViewTarget does some internal checks. If a spawnable camera has just been unspawned (i.e. the actor is PendingKill) then this trips those checks and the view target is reset to the pawn before we can even do anything. Because we are restoring the view target to the pawn, this is registered as "not changing anything" and we skip everything in UpdateCameraCut, including setting the camera cut flag.
We therefore don't use GetViewTarget, and grab the view target directly from the public member to manage things by hand.
#jira UE-190045
#rb max.chen
[CL 26550161 by ludovic chabant in ue5-main branch]
BPs that refernce Restore State will need to be fixed up manually.
Fixed up EngineTest BPs that reference Restore State
Note: This should be added to the Upgrade Notes
#jira UE-189651
#rb david.bromberg
[CL 26265110 by max chen in ue5-main branch]
bRestoreState was used to force PreAnimatedState to be cached for all items globally and then restored when the Sequence is stopped or is finished. When set to false, no such override occurred, and completion mode was determined per track section by the settings on each track section.
We now have a 3rd option- ForceKeepState. If FinishCompletionStateOverride is set to ForceKeepState, then when the sequence is stopped or completed, we do not restore any state, regardless of track section settings- all state active when the sequence ends is persisted.This is done by discarding any preanimated state metadata and storage, preventing it from being used to restore state.
#jira UE-185041
[REVIEW] ue-sequencer
[CL 26243241 by david bromberg in ue5-main branch]