I am rendering out a sequence using movie render queue via python. It renders out fine with the exception of being able to tell it which shots in the MovieSceneCinematicShotTrack. Here is what I am doing:
`MPQ = unreal.get_editor_subsystem(unreal.MoviePipelineQueueSubsystem)
LES = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
seq_name = “MySequence”
seq_path = “/Game/blah/de/blah/MySequence”
preset_path = “/Game/blah/de/blah/MyPreset”
Load up the sequence and preset assets
seq_asset = ESS.load_asset(seq_path)
preset_asset = ESS.load_asset(preset_path)
Load up the requested level
LES.load_level(level_path)
Empty the queue - one render at a time
queue = MPQ.get_queue()
queue.delete_all_jobs()
Create the job
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)
job.shot_info = unreal.Array(unreal.MoviePipelineExecutorShot)
tracks = seq_asset.find_tracks_by_exact_type(unreal.MovieSceneCinematicShotTrack)
if shots and tracks:
sections = tracks[0].get_sections()
First_Shot = True
for shot_section in sections:
shot_executor = unreal.MoviePipelineExecutorShot()
shot_executor.enabled = First_Shot
shot_executor.outer_name = shot_section.get_name()
job.shot_info.append(shot_executor)
First_Shot = False
Set up any custom configuration values not controlled through the preset
config = job.get_configuration()
Exports
config.find_or_add_setting_by_class(unreal.MoviePipelineImageSequenceOutput_JPG)
Rendering
config.find_or_add_setting_by_class(unreal.MoviePipelineDeferredPassBase)
Settings
output_setting = config.find_or_add_setting_by_class(unreal.MoviePipelineOutputSetting)
output_setting.output_directory = unreal.DirectoryPath(render_path)
output_setting.flush_disk_writes_per_shot = True
output_setting.use_custom_frame_rate = True
output_setting.output_frame_rate = unreal.FrameRate(30)
output_setting.file_name_format = seq_name + “.{frame_number}”
Submit render job
executor = unreal.MoviePipelinePIEExecutor(MPQ)
MPQ.render_queue_with_executor_instance(executor)`Notice that I have a loop that creates the Array of MoviePipelineExecutorShot that have the enable flag set. For this test I told it to set the first shot to true and all following shots to false. I’m passing the name of the section, as the docs indicate, but in the end every single shot renders. None are skipped.
What am I doing wrong there?