
Note!
If you're using 18.5 Beta 3, all the functions listed below have been disabled.
---
I had a look at the Resolve 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.
It all seems to work just fine (except for where noted with newly discovered functions added later to this post), 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 audioChannelSubType that I could find):
Updated for DaVinci Resolve 18.5
If you're using 18.5 Beta 3, all the functions listed below have been disabled.
---
I had a look at the Resolve 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.
- Resolve
- bool GetShowAllVideoFrames()
- bool SetShowAllVideoFrames(bool enable)
- bool GetSourceViewerMode()
- bool SetSourceViewerMode(string mode)
The modes I've been able to find so far are "source" and "multicam". I thought "audiotrack" would be there too but it's not.
- bool GetShowAllVideoFrames()
- Project
- int GetPlaybackSpeed()
I don't know how this one works. I only tried it in the console where this command won't execute until playback is stopped. So mostly it returned 0 except for a single time when it returned 1. - timeline GetTimelineFromUniqueId(string uniqueId)
- int GetPlaybackSpeed()
- Timeline
- bool AddTrack(string trackType, string audioChannelSubType)
- 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)
- bool DeleteClips(table items)
- bool AddTrack(string trackType, string audioChannelSubType)
- TimelineItem
- bool GetClipEnabled() Documented in v18.5
- bool SetClipEnabled(bool enable) Documented in v18.5
- bool SetNodeLocked(int nodeIndex, bool lock)
- bool ResetCurrentVersion()
- bool ResetNode(int nodeIndex)
- bool SetNodeActive(string nodeLabel)
- bool GetClipEnabled() Documented in v18.5
- MediaPool
- table TimelineItem AppendToTimeline(table clipInfo)
In addition to the documented clipInfo properties; mediaPoolItem, startFrame, endFrame and mediaType, it also accepts trackIndex and recordFrame. This means we can finally place clips anywhere on the timeline!
- table TimelineItem AppendToTimeline(table clipInfo)
It all seems to work just fine (except for where noted with newly discovered functions added later to this post), 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 audioChannelSubType that I could find):
- Code: Select all
Timeline
AddTrack(trackType, audioChannelSubType) --> Bool # Adds a track of the given type ("audio", "video" or "subtitle") to the timeline. The audioChannelSubType is only needed for audio tracks and is one of "mono", "stereo", "5.1", "5.1film", "7.1", "7.1film", or "adaptive1" to "adaptive24".
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.
Updated for DaVinci Resolve 18.5
Last edited by roger.magnusson on Wed May 24, 2023 7:42 pm, edited 8 times in total.