How to add subtitle clips with python script ?

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

Yuchen

  • Posts: 5
  • Joined: Thu Jan 14, 2021 4:32 pm
  • Real Name: Yu-Chen Hu

How to add subtitle clips with python script ?

PostFri Jan 15, 2021 3:34 pm

Hi all,

I'm looking for the counterpart python function that can an append new subtitle clip in subtitle track, just like the "Add New" button in the inspector of a subtitle clip. I tried to access a clip in suctitle track but didn't see any "Add New" related function provided. Does anyone know how to do it correctly ?

Code: Select all
import DaVinciResolveScript as dvr_script
resolve = dvr_script.scriptapp("Resolve")
projectManager = resolve.GetProjectManager()
current_proj = projectManager.GetCurrentProject()
current_timeline = current_proj.GetCurrentTimeline()
subtitle_item_list = current_timeline.GetItemListInTrack('Subtitle', 1)
subtitle_clip = subtitle_item_list[0]
dir(subtitle_clip)    # No add new clip function available
Offline
User avatar

Igor Riđanović

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

Re: How to add subtitle clips with python script ?

PostSat Jan 16, 2021 6:45 am

That's currently not possible.
www.metafide.com - DaVinci Resolve™ Apps

Return to DaVinci Resolve

Who is online

Users browsing this forum: dirk-pel, Fully_Loaded34, KrunoSmithy, Mads Johansen, qsipher, Robert John and 270 guests