
Note!
If you're using 18.5 Beta 3, all the functions listed below have been disabled.
In 18.5 Beta 4, the Timeline and MediaPool functions were enabled again and are now officially documented.
---
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.
In 18.5 Beta 4, the Timeline and MediaPool functions were enabled again and are now officially documented.
---
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) Documented in v18.5
- bool DeleteTrack(string trackType, int index) Documented in v18.5
- bool SetTrackEnable(string trackType, int index, bool enable) Documented in v18.5
- bool GetIsTrackEnabled(string trackType, int index) Documented in v18.5
- bool SetTrackLock(string trackType, int index, bool lock) Documented in v18.5
- bool GetIsTrackLocked(string trackType, int index) Documented in v18.5
- bool SetClipsLinked(table items, bool link) Documented in v18.5
- bool DeleteClips(table items) Documented in v18.5
- bool AddTrack(string trackType, string audioChannelSubType) Documented in v18.5
- 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! Documented in v18.5
- 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 Thu Jun 15, 2023 10:02 am, edited 9 times in total.