Missing reference to sequence in MRG

We are storing various metadata within the Level Sequence using custom class that implements IMovieSceneMetaDataInterface. We need to include those metadata in the render path.

In the classic render queue configuration, we achieve this by overriding the GetFormatArguments function in our custom class, which inherits from UMoviePipelineSetting. Our code looks like this:

if (InOutFormatArgs.InJob && InOutFormatArgs.InJob->Sequence.IsValid()) { ULevelSequence* LevelSequence = Cast<ULevelSequence>(InOutFormatArgs.InJob->Sequence.TryLoad()); if (LevelSequence) { UCustomMovieSceneMetaData* CustomMetaData = LevelSequence->FindMetaData<UCustomMovieSceneMetaData>(); if (CustomMetaData) { Version = CustomMetaData->GetVersion(); } } }This works correctly in the classic pipeline, as we can access the ULevelSequence and retrieve our custom metadata.

However, in the Movie Render Graph (MRG), we’ve attempted a similar approach using a class that overrides GetFormatResolveArgs. Unfortunately, the GetFormatResolveArgs function does not provide access to the sequence or map, making it impossible to retrieve the necessary metadata.

Is there any solution or workaround to access the level sequence (and thus the metadata) in the Movie Render Graph?

Could this be achieved using the new naming tokens system, or is there another recommended approach for including custom metadata in the output path when using MRG?

The whole overriding function looks like this:

`void UUPPFormatArgsSettings::GetFormatArguments(
FMoviePipelineFormatArgs& InOutFormatArgs) const
{
Super::GetFormatArguments(InOutFormatArgs);

FString Version = TEXT(“v001”);
if (InOutFormatArgs.InJob && InOutFormatArgs.InJob->Sequence.IsValid())
{
ULevelSequence* LevelSequence = Cast(InOutFormatArgs.InJob->Sequence.TryLoad());
if (LevelSequence)
{
UCustomMovieSceneMetaData* CustomMetaData = LevelSequence->FindMetaData();
if (CustomMetaData)
{
Version = CustomMetaData->GetVersion();
}
}
}
InOutFormatArgs.FilenameArguments.Add(TEXT(“custom_version”), Version);
}`