Undocumented Resolve v16.2.1 API functions

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

roger.magnusson

  • Posts: 1239
  • Joined: Wed Sep 23, 2015 4:58 pm

Undocumented Resolve v16.2.1 API functions

PostWed May 06, 2020 1:24 pm

I had a look at the Resolve v16.2.1 executable and found some API functions that aren't yet listed in the API documentation.

After some trial and error I was able to work out the parameters needed.
  • Timeline
    • bool AddTrack(string trackType, string audioTrackType)
    • bool DeleteTrack(string trackType, int index)
    • bool SetTrackEnable(string trackType, int index, bool enable)
    • bool GetIsTrackEnabled(string trackType, int index)
    • bool SetTrackLock(string trackType, int index, bool lock)
    • bool GetIsTrackLocked(string trackType, int index)
    • bool SetClipsLinked(table items, bool link)
  • TimelineItem
    • bool GetClipEnabled()
    • bool SetClipEnabled(bool enable)
    • bool SetNodeLocked(int nodeIndex, bool lock)

It all seems to work just fine, but since it's not documented you should probably expect changes in later releases.

Here's the same list in a similar form as the API readme (including the possible values for trackType and audioTrackType that I could find):
Code: Select all
Timeline
  AddTrack(trackType, audioTrackType)             --> Bool               # Adds a track of the given type ("audio", "video" or "subtitle") to the timeline. The audioTrackType is only needed for audio tracks and is one of "mono", "stereo", "5.1film", "7.1film", or "adaptive".
  DeleteTrack(trackType, index)                   --> Bool               # Deletes a track of the given type at the specified index (int). 1 <= index <= GetTrackCount(trackType)
  SetTrackEnable(trackType, index, enable)        --> Bool               # Enables or disables the given track. The enable parameter is a boolean value.
  GetIsTrackEnabled(trackType, index)             --> Bool               # Returns whether a track is enabled or not.
  SetTrackLock(trackType, index, lock)            --> Bool               # Locks or unlocks the given track. The lock parameter is a boolean value.
  GetIsTrackLocked(trackType, index)              --> Bool               # Returns whether a track is locked or not.
  SetClipsLinked([items], link)                   --> Bool               # Links or unlinks the given clips (TimelineItem objects). The link parameter is a boolean value.

TimelineItem
  GetClipEnabled()                                --> Bool               # Returns whether a clip is enabled or not.
  SetClipEnabled(enable)                          --> Bool               # Enables or disables a clips. The enable parameter is a boolean value.
  SetNodeLocked(nodeIndex, lock)                  --> Bool               # Locks or unlocks a Color page node at the given nodeIndex (int). The lock parameter is a boolean value.
Offline
User avatar

iddos-l

  • Posts: 328
  • Joined: Sat Mar 30, 2019 7:55 pm
  • Real Name: iddo lahman

Re: Undocumented Resolve v16.2.1 API functions

PostWed May 06, 2020 2:16 pm

Very interesting!
Thanks for sharing.
By the way I was using your class browser the other day. It was a great help.
Cheers


Sent from my iPhone using Tapatalk
Offline
User avatar

roger.magnusson

  • Posts: 1239
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Undocumented Resolve v16.2.1 API functions

PostWed May 06, 2020 7:04 pm

I'm glad you've found it useful!
Offline

BrettRayner

  • Posts: 9
  • Joined: Tue Oct 03, 2017 1:57 pm

Re: Undocumented Resolve v16.2.1 API functions

PostSat May 23, 2020 11:48 am

This is awesome, thank you! Is there any chance you could explain how you found these functions? Or is it too complex to get into
Offline
User avatar

roger.magnusson

  • Posts: 1239
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Undocumented Resolve v16.2.1 API functions

PostSat May 23, 2020 3:09 pm

Not complex at all, I just looked at the executable in a hex viewer. I searched for existing functions and next to them I found some that weren't documented.

Return to DaVinci Resolve

Who is online

Users browsing this forum: davidhdennis, Google [Bot], Igor Riđanović, Marc Wielage, Mark ID and 73 guests