You can download the code in GitHub
https://github.com/cloudjuice/Davinci-R ... ender-tool
notice: My native language is not English. So if you can help me find the mistakes in article, it would be nice.
Prepare
1.Open Davinci Resolve and enter the Developer folder

2. Find DaVinciResolveScript.py in
Code: Select all
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules/DaVinciResolveScript.py
Code: Select all
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Comp

p.s. If nothing happen, open the console of Davinci Resolve, If you find the traceback is "ModuleNotFoundError: No module named '_tkinter'", it is because the python version in Davinci maybe not complete and didn't include the tkinter package. Try to install the complete version of python 3.6(like use pyenv), and run the code outside of Davinci Resolve, like VSC or Terminal. (Sorry I don't know how to solve this problem in my code)
How to use this code
The info storage in the blue marker which is at the beginning of the timeline, like this

this marker means episode 2, version 1. When you run the code, python will read the info of marker. When a timeline have no marker, python will automatically identify and prompt for human confirmation. Like this

If it is right, just click "confirm" to continue. notice the name of timeline should be beginning with letter "E" or "e", otherwise, the timeline will be identify as irrelevant timeline and add a red marker. the timeline with red marker will be pass and can't be render at the next step. But you can simply change the marker info by hand, and run the code again.
after read all timeline information, you should see all episode in this UI,

Click this button to jump to the corresponding timeline.

If you have multiple timeline for same episode, you can chose the version here, and can click the button at left to jump to the timeline

show the name of timeline

This checkbox is use to define if it need to be render at the next step, by default it is checked.

click the button "location" to chose the output path
back to Davinci Resolve, go to Deliver page, chose a render setting you need(you can set any category if you want).

click the "render" button and all timeline with the checkbox will be send to Render Queue. If you chose render Single clip, the file name will be "episode_date"(like 04_0424). If you chose Individual clips, it will create a subfolder named "episode_date"

back to Davinci Resolve, click "Render All" to render the timeline in the Render Queue.
The extra import function
If you have a lots of VFX or other footage for different episode, and your folder structure is like this(each episode folder have xml and footage in it)

click "import" and chose the root folder you need to import(like the folder name "240410")

back to Davinci Resolve, in Edit page, chose the folder you want to import

click "begin" to begin

the clip and timeline will be automaticity import to Davinci and create a folder name "episode_date"

I want to make the code do more work like paste the footage on the correct episode timeline, but I can't find the API can achieve this. I'm not a programmer, this is my first python code, I hope anybody can help me to improve the code. Or add more interesting function to this little tool.
Hope you can help me
1. Correct the comments in the code. Make other people easy to understand the code.
2. Bug fixing. This code definitely has many issues. It just at the level where it can run.
3. Algorithm improvement. Perhaps you have a simpler method to implement, which can make the code more concise.
4. UI. It is really bad, I'm not good at tkinter, maybe you can rewrite it or change it in to fusion script(It would fix lot of problem cause by tkinter package missing and python version ).
5. Add more interesting function.