I've played around with Resolve scripting and TOPs. I’ve been less successful on my actual goal but now I have a crude render manager for resolve. Providing the ability to start renders from several projects. A functionality I actually missed a few weeks back when having to render several longer clips from different projects.
Starting a render wasn't particularly easy since as far as I know, Resolve does not feature a true command line renderer where you specify a file and it renders.
I don't actually think this is possible due to the Database approach.
Instead, you need to find and open a project, find the render jobs and start rendering.
For the rendering, I copied several functions out of the scripting examples that come with resolve. They ensure that the script will wait on Resolve to finish rendering before starting the next render job. Without this waiting, I experienced short freezes and ultimately it would error out on the next project to render. This is definitely something to keep in mind when creating your own Resolve render scripts.
I also haven't found a way to have an external script use any of the attributes that you can set in TOPs.
I assume this needs to be split up into individual TOPs.
But the intermediate result right now is this:
Disclaimer: This is very much alpha and while functional I wouldn't rely on this for now.
Create a renderlist:
Optional TOPs network:
It's essentially just starting a script that also works on its own.
You don't need to start it through TOPs. The script will read a csv list of projects you have specified and render all render jobs in these projects that haven't been rendered yet.
In theory, this should be platform agnostic but I haven’t tested this on any other machine than my own windows pc.
Usage:
First, you need to add these scripts to resolve like any other script. Place them in your preferred userdata path. I placed them under the “Deliver” folder.
Then you need to start the script
Edit_Renderlist.
This script features a UI that allows you to add and remove projects to a csv list. This is being created at the default userdata path. You can check the location in the console when the script is opened.
Deleting entries can be buggy for now so you might need to double click twice.
Save the list.
Next, you can start the second script called
Resolve_Render_From_ProjectList
Either start it through Resolve, the fuscript command line (or TOPs which is just starting through the command line, too)
This script does
not employ any UI.
It will simply go through the projects it finds in the Renderlist file and renders the desired render jobs.
As of right now this only works in the last opened database. It’s definitely possible to take databases into account but that’s a feature that I would add if I personally need it or if there is a general interest in a script like this.
More information:
- This doesn't work with my initial goal of using the deadline TOPs scheduler. But not because of any error in the script, the deadline scheduler doesn't manage to open Resolve in the first place.
- The TOPs functionality, in general, is limited. My example shows how to launch a script but as it is right now, you don't have any benefits to simply starting this in Resolve. (If you use hqueue this might be a different story)
- I chose a csv list compared to a simple textfile because I initially hoped to use this file with the CSV Import TOP. At least now there is an example of how to write a csv using Lua/Fusion.
- The TOPs network is very crude. Starting Resolve, waiting 20 seconds, and then starting fuscript to start the script.
- I imagine it would be easier to use the same or a similar script to submit this to deadline using a custom submitter script but as mentioned above I can't seem to wrap my head around the deadline documentation for now.
- The final function of quitting Resolve is disabled in the script. This is simply because for testing we probably don't want to open Resolve all the time
- The code is a mess. I need to read some "best practices" the next time. But the scripts are functional.
- I'm all ears if somebody has ideas to improve this!
Big thanks to you
@AndrewHazelden. Your initial post made me look into Resolve scripting for the first time and I've learned a bunch! Also, controlling Fusion through TOPs will come in handy!
Posts I've used:
Resolve Scripting Essentials
Building GUIs With Fusion's UI Manager
UITree method FindItems() is broken [FIXED]
Edit_Renderlist.lua
Resolve_Render_From_ProjectList.lua
You do not have the required permissions to view the files attached to this post.