Trigger Script After Render - Filename of rendered files

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

crackly

  • Posts: 2
  • Joined: Sun Jan 08, 2023 2:50 pm
  • Real Name: Chris Racklyeft

Trigger Script After Render - Filename of rendered files

PostSun Jun 04, 2023 5:11 pm

I have a python script that I want to run after a render has completed. This is running well. However I want to access the video path + filename that was rendered.

I can access the job by using the jobID (as in the example 8_slack_notification_by_render_job.py) however it only includes the filename and path as defined in the render settings. As I am using variables it doesn't tell my script where the rendered file(s) was saved to.
For example:
'TargetDir': 'D:\\Temp\\%{Start Frame}%{Project Name}',

Is the name of the rendered file(s) available to the script?

Thanks for your help.
Offline
User avatar

Igor Riđanović

  • Posts: 1596
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Trigger Script After Render - Filename of rendered files

PostTue Jun 06, 2023 8:56 pm

That's an interesting problem. I haven't tested that particular condition where you use variables in the render filename and path. It sounds like you have exhausted the options when accessing the render job by its UID.

You may need to look into a more heuristic solution, maybe you know the approximate path where the rendered file resides and can poll the OS to find out the most recently written file? Maybe you can correlate that with the Resolve media pool items metadata from which you derive the filename and path? Maybe there are some potential clues in timeline name string?
www.metafide.com - DaVinci Resolve™ Apps
Offline

crackly

  • Posts: 2
  • Joined: Sun Jan 08, 2023 2:50 pm
  • Real Name: Chris Racklyeft

Re: Trigger Script After Render - Filename of rendered files

PostMon Jun 12, 2023 3:25 pm

Thanks for your response Igor, I'm working now on the assumption that it probably isn't possible so I'll replace the parameters myself based on the information available through the API.

I'm only using a few variables so its not a big job but it would be really useful if either:
- The path with variables replaced was available in the job, or
- There was an API function that could be used to do the replacements

Chris

Return to DaVinci Resolve

Who is online

Users browsing this forum: Animotion, Bing [Bot], Dave Shortman, Gary Hango, Google [Bot], JockeSv, panos_mts and 236 guests