Resolve Scripting Help Needed

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

kyle.upton

  • Posts: 1
  • Joined: Tue Mar 16, 2021 3:56 pm
  • Real Name: Kyle Upton

Resolve Scripting Help Needed

PostTue Mar 16, 2021 4:24 pm

I'm currently writing an Electron plugin for Resolve using the javascript api.

I want to export the current timeline on the current project (or maybe all the timelines on the current project?) to be used in other video editing applications. The equivalent of doing this manually would be File -> Export -> Timeline.

The problem is I need to specify what format the output file needs to be, and there's no documentation to help me.

Code: Select all
const resolve = api.GetResolve();
const pm = resolve.GetProjectManager();
const currentProject = pm.GetCurrentProject();
const currentTimeline = currentProject.GetCurrentTimeline();

currentTimeline.Export('/file/path/and/name.aaf', 'aaf');


I'm reasonably sure that the first parameter is the file path, and the second is the file format, but I could be wrong.

When I run the code above I get the following error, no matter what I enter for the file format.

Code: Select all
Uncaught Error: Export: Error response (errorStr:Invalid export type provided) (errorCode:2)


This raises the following question: What are the proper parameters for this function? I can't seem to find any documentation online.

Any help would be appreciated, either from the community or a developer at BMD!

Return to DaVinci Resolve

Who is online

Users browsing this forum: Enrico Budianto and 195 guests