AWS Thinkbox Discussion Forums

Unreal Plugin overrides

Hi there,

I’ve been using the Deadline Unreal plugin for the last few weeks, it’s been great for triggering jobs directly from the Editor.

One problem I’ve had is when adding a Settings Config preset to the Sequence, the Deadline Plugin’s Output Directory and Filename Format overrides don’t take effect. The render files are still output to {project_dir}/Saved/MovieRenders/.


I have also attempted to set overrides via a Pre Render script, but no effect.

job.SetJobExtraInfoKeyValue("output_directory_override", <output_folder>)
job.SetJobExtraInfoKeyValue("filename_format_override", <file_format>)

How can I override the folder and file format that the Settings Config sets?

Thanks!

Maria

Taking a look at how the submitter does it, in DeadlineRepository10\plugins\UnrealEngine5\UnrealEnginePlugins\MoviePipelineDeadline\Content\Python\remote_executor.py it looks like the overrides are stored as JobExtraInfo<some number from 0-9> instead of the key/value pair.

If you set that, and double click the job in the Monitor what do you see in the ‘submission params’ section? It could be that the job isn’t getting created properly, or the plugin isn’t respecting the settings on the job.

Hi Justin,

Thanks for your response. I did not fix the issue but I had some interesting results. Apologies for what’s about to be a long post, but I’m going to describe the results below, I’ve also attached the Submission Params logs for each scenario.


Test 1

  • No Settings Config set on the Sequence
  • Set JobExtraInfo1 and JobExtraInfo2

Result

  • Overrides don’t work
  • Properties set to wrong values
OutputDirectory0=C:\repos\Sweet_Dreams\Factory_Room\Saved\MovieRenders
OutputFilename0=MySequence.####.jpeg
  • See log "Deadline_Extra-Info-set_no-settings-config.txt"

Test 2

  • Settings Config set on the sequence
  • Set JobExtraInfo1 and JobExtraInfo2

Result

  • Overrides don’t work
  • Properties don’t get set
  • See log "Deadline_Extra-Info_with-settings-config.txt"

Test 3

  • No Settings Config set on the Sequence
  • Set job.SetJobExtraInfoKeyValue("output_directory_override", <folder>) and job.SetJobExtraInfoKeyValue("filename_format_override", <format>)

Result

  • Override work
  • Properties set:
OutputDirectory0=C:\Render\0259_Sweet_Dreams\MyLevel\2024.01.28_10.28.08
OutputFilename0=MyLevel-MySequence-no shot-1920_1080_2024.01.28_10.28.08_####.jpeg
  • See log "Deadline_Key-Values-set_no-settings-config.txt"

Test 4

  • Settings Config set on the sequence
  • Set job.SetJobExtraInfoKeyValue("output_directory_override", <folder>) and job.SetJobExtraInfoKeyValue("filename_format_override", <format>)

Result

  • Overrides don’t work
  • Properties don’t get set
  • See log "Deadline_Key-Values-set_with-settings-config.txt"

It seems that when the Settings Config is present, the overrides are not respected as you’ve suggested.


[Deadlne_Submission_Params_Logs.zip|attachment](upload://hEsifuyHCHdhVY5DTMm2hHvKJTy.zip) (10.8 KB)

The file upload didn’t work right - it may have not been completed by the time you hit submit. Could you re-try and I’ll take a look?

Hi Justin

I’m currently encountering an error when uploading files (png, zip or otherwise). Error message is “Sorry, there was an error uploading that file. Please try again.”

I’ve upload the logs to google drive if that works for you. Let me know if any issues, thanks for taking a look.

https://drive.google.com/file/d/1ZHK173mR5IwWQiU_EKHww2E-CWGB0Jyo/view?usp=sharing

Hi Justin,

Wondering if you have any updates on this output folder override issue.

I have also tried manually setting it in remote_executor.py and on the job object itself in deadline_service.py, but once the rendering begins the Output Directory value in the MoviePipelineSetting takes precedence.

Many thanks,
Maria

This is the workaround that I have arrived at for the time being, I have directly edited the plugin file.

In Plugins/MoviePipelineDeadline/Content/Python/remote_executor.py in the for loop that iterates over the jobs in the queue I have added


    for original_job in self.pipeline_queue.get_jobs():
            settings = original_job.get_configuration()
            job = self.pipeline_queue.duplicate_job(original_job)
            job.on_duplicated()
            job.set_configuration(settings)

	        # existing loop code ...

	        self.pipeline_queue.delete_job(job)

This duplicates the current job’s settings and the job. The reason it needs to be duplicated is because when editing the settings on the original it will change the actual config file in the Editor. By duplicating I leave the original job and its settings intact. When the duplicated job is submitted the overrides in my Pre Render script are successful. I am not sure why overriding the original config doesn’t work, overriding the duplicate does work.

At the end I delete the duplicate job to remove it from the Editor UI.

That makes sense - but I don’t know about why only the duplicated job will take changes without affecting what’s set in the Editor.

The overrides in your files do look correct, are there any callouts in the logs about overrides being ignored or not used?

Hi Justin, I’m seeing the following logs which suggest that the overrides are getting noticed.

2024-02-13 17:48:01:  0: WARNING: Warning: Overriding output directory! New output directory is `C:/Render/{level_name}/{date}_{time}`.
2024-02-13 17:48:01:  0: STDOUT: [2024.02.13-17.48.00:790][  1]LogPython: Warning: Overriding output directory! New output directory is `C:/Render/{level_name}/{date}_{time}`.
2024-02-13 17:48:01:  0: WARNING: Warning: Overriding filename format! New format is `{output_filename}`.
2024-02-13 17:48:01:  0: STDOUT: [2024.02.13-17.48.00:790][  1]LogPython: Warning: Overriding filename format! New format is `{output_filename}`.
2024-02-13 17:48:01:  0: STDOUT: [2024.02.13-17.48.00:790][  1]LogPython: MRQ job started...
2024-02-13 17:48:01:  0: STDOUT: [2024.02.13-17.48.00:790][  1]LogPython: Is remote render: False

full log here deadline log.txt - Google Drive

Hi Justin, please could you confirm whether the overrides issue I am experiencing is a bug?

I haven’t been able to fix this by means of using the plugin GUI, only via editing the plugin code directly.

If it is a bug is there support from the development team to investigate/fix?

Maria

I can’t figure what’s keeping Unreal from respecting the changes, absolutely a bug.

I can see the overrides making it to Unreal, in the movie render queue’s JSON blob:

                "PresetOverrides": {
                    "__Type": "StructProperty",
                    "__StructName": "DeadlineJobPresetStruct",
                    "__Value": {
                        "Name": {
                            "__Type": "StrProperty",
                            "__Value": "adsadgadf"
                        },
                        "UserName": {
                            "__Type": "StrProperty",
                            "__Value": "maria"
                        },
                        "BatchName": {
                            "__Type": "StrProperty",
                            "__Value": "batch1"
                        },
                        "PreJobScript": {
                            "__Type": "StructProperty",
                            "__StructName": "FilePath",
                            "__Value": {
                                "FilePath": {
                                    "__Type": "StrProperty",
                                    "__Value": "C:/mlf/Sweet_Dreams_Unreal_Projects/FactoryRoom/RenderScripts/UpdatePlasticWorkspace.py"
                                }
                            }
                        },

And the application plugin sees the change as well:

2024-02-13 17:48:01:  0: WARNING: Warning: Overriding output directory! New output directory is `C:/Render/{level_name}/{date}_{time}`.

I’m not sure why you’ve got to duplicate the job though. The override prints do happen in _on_individual_shot_finished_callback, but that gets fired after a shot has been rendered, and would run with your original job as well.

I’ve made a bug report, but I can’t say anything about where it is in the roadmap.

Yes it’s peculiar! Thanks for investigating and submitting the bug report. Hope my workaround holds out for the time being :grinning:

I will do another pass when I am digging into the pipeline again to confirm that the job really does need duplication.

Maria

1 Like
Privacy | Site terms | Cookie preferences