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]