Does anyone have a link for a tutorial on how to best set Draft up as a hardcoded post render action? I’m trying to get it setup on the network and open the render from RV, but I’m not having success and the documentation isn’t great. Thank you in advance.
@Derek_E_Zavada is there a recommended way to have the automatically open RV on the artists workstation once AutoDraft has run. I tried modifying the code to run after, but it doesn’t seem to want to launch.
There are a few ways to set up an auto-launch, but it would involve some custom coding. For instance, you could configure it to send a message to your Slack or, if you’re on Windows, to your Windows notifications, including a link. Alternatively, you could develop a service that runs on all systems, continuously checking for completed draft jobs related to a specific artist. Another option is to create a custom RV plugin that automatically looks for the latest draft renders for that particular artist. The best approach depends on your specific environment and configurations.
Interesting. I tried this at the end of the Autodraft script…
Launch the QuickTime file using Custom Image Viewer 1
if isMovie:
try:
subprocess.Popen(["python", r"C:\DeadlineRepository10\custom\events\AutoDraft\DraftQuickSubmission\DraftLaunchMovie.py"])
print("Launched QuickTime file in Custom Image Viewer 1")
except Exception as e:
print(f"Failed to launch QuickTime file: {str(e)}")
and this
After submitting the Draft job
draft_job_id = self.CreateDraftJob(…) # Locate the actual line where the Draft job is created
Submit the DraftLaunchMovie.py script as a post-processing job
post_process_script = r"path\to\DraftLaunchMovie.py" # Update with the correct path to the script
post_process_job_info = {
“Name”: f"Launch QuickTime for {job.JobName}",
“Plugin”: “Python”,
“UserName”: job.UserName,
“Frames”: “0”,
“ScriptFile”: post_process_script,
“JobDependencies”: draft_job_id,
“BatchName”: job.BatchName,
}
Convert job_info dictionary to a format Deadline can understand and submit the job
job_info_file = RepositoryUtils.WriteJobInfoFile(post_process_job_info)
post_process_job_id = self.CallDeadlineCommand([job_info_file])
print(f"Submitted post-processing job with ID: {post_process_job_id}")
The second one I build a small custom script to handle the launching of the script.
My struggle is triggering that second script which is a small python script. Which is below…
import os
import subprocess
from Deadline.Scripting import ClientUtils, RepositoryUtils
def main():
# Path to the generated QuickTime file
quicktime_path = “path_to_your_generated_quicktime.mov” # Update with actual path
# Retrieve the path to the Custom Image Viewer 1 from Deadline
viewer_path = ClientUtils.GetDeadlineSettings().GetConfigEntry("CustomImageViewer1")
if viewer_path and os.path.exists(quicktime_path):
try:
# Launch the QuickTime file in the specified viewer
subprocess.Popen([viewer_path, quicktime_path])
print(f"Launched QuickTime file in Custom Image Viewer 1: {quicktime_path}")
except Exception as e:
print(f"Failed to launch QuickTime file in Custom Image Viewer 1: {str(e)}")
else:
print("Custom Image Viewer 1 is not set in Deadline or QuickTime file does not exist.")
if name == “main”:
main()