Sequencer SetPreRollFrames at runtime on UMovieSceneCameraCutSection

Hi,

We would like to set the camera cuts pre roll frames at runtime when a sequence is started to evaluate the ideal value and measure performance differences, as a global value for all sequences/camera cuts.

Our test code below however doesn’t work, even after exposing and calling ForceUpdateEvaluationTree (which I can see correctly adapt / set the range and pre-roll flags).

What I see is UMovieSceneCameraCutTrackInstance::OnAnimate() only has the current camera track in its SortedInputInfos array. In cases where pre-roll is setup in the sequence asset directly there are two elements (current + upcoming camera cut) for the duration of the pre-roll frames.

I feel like I am missing something simple, or maybe it is not possible to re-evaluate/rebuild inputs at runtime (UMovieSceneTrackInstanceInstantiator::OnRun) ?

Thanks in advance for your help !

Hugo

  UMovieScene* MovieScene = MovieSceneSequence ? MovieSceneSequence->GetMovieScene() : nullptr;
  UMovieSceneTrack* CameraCutTrack = MovieScene ? MovieScene->GetCameraCutTrack() : nullptr;
  if (!CameraCutTrack)
  {
    return;
  }
  bool bAnyForced = false;
  for (UMovieSceneSection* Section : CameraCutTrack->GetAllSections())
  {
    if (UMovieSceneCameraCutSection* CameraSection = Cast<UMovieSceneCameraCutSection>(Section))
    {
      if (CameraSection->GetPreRollFrames() > 0)
      {
        continue; // Manually set in the sequence, leave the existing value.
      }
      bAnyForced = true;
      CameraSection->SetPreRollFrames(VALUE);
    }
  }
  if (bAnyForced)
  {
    CameraCutTrack->ForceUpdateEvaluationTree();
  }

[Attachment Removed]

Hi there,

Thank you for the information.

This issue is related to how Sequencer builds and caches its evaluation field at compile time. When ForceUpdateEvaluationTree() is called, it only refreshes the evaluation ranges. It does not rebuild the compiled segment structure that determines overlapping inputs. When a Level Sequence begins play, its evaluation field is compiled, and overlapping segments are inserted during this process.

As a result, changes to Pre-Roll values require the sequence to be recompiled in order to take effect. And this means stopping and replaying the sequence to force the recompilation.

For runtime testing, one possible approach is to introduce a global value and apply it when the track updates the evaluation tree or the section calls GetPreRollFrames.

If the goal is to create a repeatable test setup that supports easy A/B comparison, a common alternative is to create an Editor Utility Widget that batch-edits the Pre-Roll values of all Camera Cuts directly in the editor.

I hope this clarifies the situation. Please let me know if you have any further questions.

Best regards,

Henry Liu

[Attachment Removed]

Thank you.

I will close this case now, but don’t hesitate to reach out if anything else comes up.

Cheers,

[Attachment Removed]