Commit Graph

327 Commits

Author SHA1 Message Date
ludovic chabant
fac2642a5a Sequencer: fix crash when adding possessables to a level sequence via scripting
#rb Andrew.Rodham

[CL 30020600 by ludovic chabant in ue5-main branch]
2023-11-30 14:33:10 -05:00
andrew rodham
389412f945 Sequencer: Convert default binding mechanism to use universal object locators
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]
2023-11-27 09:05:23 -05:00
ludovic chabant
c2bfe4b3e9 Sequencer: move more IMovieScenePlayer features into playback capabilities
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]
2023-11-22 15:18:16 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
david bromberg
dd8c44e6f5 Sequencer- Binding Lifetime Track.
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]
2023-11-10 07:34:17 -05:00
bob tellez
4c22954a3a [Backout] - CL29197913
[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]
2023-10-28 00:23:25 -04:00
mike zyracki
1822ed921e Sequencer: Linked Anim Instances. Delete links if we can't resolve(by loading) the object referenced.
#jira UE-198720
#rb max.chen

[CL 29203360 by mike zyracki in ue5-main branch]
2023-10-27 19:11:21 -04:00
mike zyracki
08d54ce5d2 Sequencer: Linked Anim Instances. Delete links if we can't resolve(by loading) the object referenced.
#jira UE-198720
#rb max.chen

[CL 29197949 by mike zyracki in ue5-main branch]
2023-10-27 17:04:24 -04:00
max chen
de6b800de0 Sequencer: Mark SequencePlayer as deprecated for 5.4. It can be accessed through GetSequencePlayer()
#jira UE-197922
#rb andrew.rodham
#noqatesting
#lockdown aaron.dittmann, scott.lindeneau, corey.novich, dan.nottingham

[CL 28973413 by max chen in ue5-main branch]
2023-10-20 14:10:22 -04:00
louisphilippe seguin
1906b0f750 LevelSequenceActor only supports the subobject list and needs to force it true.
#jira UE-198051
#rnx

[CL 28805244 by louisphilippe seguin in ue5-main branch]
2023-10-16 13:22:26 -04:00
louisphilippe seguin
9fb288716a Fix LevelSequenceActor replication in Iris by converting them to use the replicated subobject list.
MoveSceneSequencePlayer now creates Iris replication fragments correctly.

#rnx
#rb Lonnie.Li

[CL 28751693 by louisphilippe seguin in ue5-main branch]
2023-10-13 10:14:03 -04:00
dan smith
fe6e821dd4 Fixed [at]oaram typo (should be [at]param) in various files
#rnx

[CL 28698745 by dan smith in ue5-main branch]
2023-10-11 22:54:35 -04:00
max chen
830d9a925b Sequencer: Modify when adding a section for CreateSpawnable
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]
2023-10-10 22:03:53 -04:00
ludovic chabant
1af1bee2b1 Sequencer: don't add a playback capability if it already exists
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]
2023-09-22 12:43:40 -04:00
ludovic chabant
2814fcabe7 Sequencer: use pre-animated state API in camera cut track instance, and remove directly use of player API
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]
2023-09-21 13:26:39 -04:00
max chen
15dc1334bd Sequencer: Make sure setting the last view target is done even in early out. This fixes an issue where if sequence 1 plays and cuts to camera 1, and the sequence 2 plays and also cuts to camera 2, it restores properly when the sequences finish playing.
#rb ludovic.chabant

[CL 27118544 by max chen in ue5-main branch]
2023-08-15 16:20:45 -04:00
patrick enfedaque
6188379211 LevelSequence: Fix LevelInstance actor resolving of AlwaysLoaded LevelInstance actors and Disabled Streaming World Partitions
#rb richard.malo
#rnx

[CL 26615274 by patrick enfedaque in ue5-main branch]
2023-07-26 14:13:45 -04:00
ludovic chabant
d21bb511c2 Sequencer: fix static analysis warnings
#rb max.chen

[CL 26609771 by ludovic chabant in ue5-main branch]
2023-07-26 12:00:39 -04:00
ludovic chabant
95adb6370b Sequencer: fix camera cut flag not being set when spawnable cameras are the last in control
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]
2023-07-24 14:05:34 -04:00
ludovic chabant
f815208aa5 Sequencer: correctly reset the last known serial number when handling replays.
This was causing all replay messages to be ignored for being too old.

#rb nickolas.drake

[CL 26481536 by ludovic chabant in ue5-main branch]
2023-07-20 07:28:13 -04:00
max chen
1aa6262463 Sequencer: Fix deprecation for bRestoreState. Added meta tags and WITH_EDITORONLY_DATA
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]
2023-06-27 14:14:04 -04:00
christopher waters
4e96f4193d Removing UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_0 and UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_1 including all uses in the engine.
[CL 26259545 by christopher waters in ue5-main branch]
2023-06-27 11:54:23 -04:00
david bromberg
57cbe03db6 Sequencer- Change bRestoreState boolean option on FMovieSceneSequencePlaybackSettings to an enumeration named FinishCompletionStateOverride with 3 values (Default, ForceKeepState, ForceRestoreState) with ForceRestoreState being the equivalent option to setting bRestoreState to true.
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]
2023-06-26 16:15:24 -04:00
ludovic chabant
0b39d4c528 Sequencer: carry over the previous view target from a previously playing level sequence, if any
#rb max.chen

[CL 26193855 by ludovic chabant in ue5-main branch]
2023-06-22 16:59:54 -04:00
max chen
339ff03eb5 Remove UE_DEPRECATED(5.1)
#rb matt.hoffman, ludovic.chabant
#rnx

[CL 26168649 by max chen in ue5-main branch]
2023-06-21 19:06:01 -04:00