How to exclude certain shots from a MRQ rendering via python

Hi Tom,

What’s happening there is that the “shot_info” array is generated internally when you set the job’s sequence, and then regenerated internally when the executor runs, overriding your attempt at customizing its settings.

This second regeneration of the “shot_info” array is unfortunately necessary on the current implementation. The good news is that it does attempt to keep the “enabled” flag previously set on each MoviePipelineExecutorShot. However, for this to work, the shots must be in the expected order and both their “inner_name” and “outer_name” must match the expected values. The easiest way to guarantee this is to keep the original “shot_info” array unaltered, with the exception of the “enabled” flags. Here’s an example that should work:

`# Get the movie render queue and empty it
queue = MPQ.get_queue()
queue.delete_all_jobs()

Create our job and set it up with the level, level sequence, and preset assets

job = queue.allocate_new_job()
job.map = unreal.SoftObjectPath(level_path)
job.sequence = unreal.SoftObjectPath(seq_path)
job.set_configuration(preset_asset)

Build a list of shots to enable/disable (render only first)

First_Shot = True
for shot_info in job.shot_info:
shot_info.enabled = First_Shot
First_Shot = False`Alternatively, if you find it easier to iterate over the MovieSceneCinematicShotSection objects, you can backup their “is_active” editor property and set it as needed before rendering. This also allows you to control which ones should be rendered. After rendering is done, you can restore that property from the backup.

I hope this is helpful. Please let me know if one of these approaches work for you.

Best regards,

Vitor