Whenever I toggle Lock, Pin, Ignore on subsequences or adding new transform key on a character inside a subsequence the Actors lose the LevelSequenceActor transform offset they have at preview and go back to world origin, playback is based on the origin instead of LevelSequenceActor after this.
If I scrub back to frame -1 and move to a frame > 0 the playback is correct again, relative to LevelSequenceActor.
If I call `RequestInvalidateCachedData()` on `OnMovieSceneDataChanged` the playback continues correctly relative to LevelSequenceActor. The problem is that this doesn’t take the LOCK into account. So if no solution is found a more generic delegate to catch all changes in Sequencer and force this call might be ok for now.
ISequencerModule& SequencerModule = FModuleManager::LoadModuleChecked<ISequencerModule>("Sequencer");
FOnSequencerCreated::FDelegate InOnSequencerCreated;
InOnSequencerCreated.BindLambda([](TSharedRef<ISequencer> NewSequencer)
{
// When a Sequencer is opened, bind a refresh listener to it
NewSequencer->OnMovieSceneDataChanged().AddLambda([WeakSeq = TWeakPtr<ISequencer>(NewSequencer)](EMovieSceneDataChangeType Change)
{
if (TSharedPtr<ISequencer> Seq = WeakSeq.Pin())
{
Seq->RequestInvalidateCachedData();
}
});
});
Can someone help me debug this? Not sure how easy is to repro the setup. Pointing to a location I can look at to detect how the LevelSequenceActor reference is lost would be appreciated at least