Resolve 15 Scripting Feedback

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

Nick Verlinden

  • Posts: 166
  • Joined: Wed Aug 12, 2015 11:08 am

Resolve 15 Scripting Feedback

PostFri Jun 15, 2018 7:49 pm

While Resolve 15's scripting API is still in the works, I thought it could be useful to give some feedback while trying to implement some workflows. I appreciate everything BMD has done so for with the API.

  • As scripts are not limited to doing Fusion stuff, it does not make much sense to put the scripts in the Fusion menu. You should be able to call scripts while not on the Fusion page. Currently, when not on the Fusion page, the scripts are disabled in the menu. Maybe the scripts section needs to be a main menu?
  • Currently, I'm missing the ability to get the selected clips on the active timeline to perform script wizardry onto.
  • There is a function in the API to add markers to timelines and clips, but there does not seem to be a function to get markers. Maybe I'm missing something here.
  • I would like to be able to get the Resolve timeline resolution as set in the Project Settings inside Fusion simple expressions (Now that individual clips use their native resolution since 15b5, it seems impossible to get the timeline resolution. Adding to this, more information of the project would be useful, such as Timeline name etc.. This way we can generate info cards for archival purposes.
  • The text input for the simple expressions in Fusion is too small. It should be scalable to more than one line. Some of my expressions are very long, and this becomes unworkable inside the text input. I copy pasted from notepad a lot because tweaking the expression in the tiny text box just didn't work.
  • Until now, I could not figure out how to get the Fusion object inside the Frame Render Script. I found some examples, but none of them worked.
  • It seems that there is currently no support for loading scriptlibs? I have a sample scriptlib inside the script:/comps folder that shows a dialog when stand alone Fusion starts up, but this does not seem to work in Resolve 15b5.
  • Resolve and fusion scripting documentation is currently missing more detailed explanation about the availability of built-in variables, such as "self" and "comp" in simple expressions. I find it specifically hard to find documentation for simple expressions, and inTool expressions.
  • The AskUser dialog's bottom margin is incorrect. It does not look very nice.
  • Ditto for the console window, the bottom margin cuts off a few pixels at the bottom. It does not look very nice.
  • It would also be awesome if all of the windows you can generate using the scripting api (AskUser, UIDispatcher, the console itself, ...) would have the native Resolve dark grey window frame. It does not look very nice using the operating system window decoration.
  • Adding the ability to create a dockable panel inside all tabs would be something amazing for the future.
  • Adding a WebBrowser UI control would also be amazing in the future.
macOS 10.13.2 High Sierra
Core i9 7920X, 32GB RAM
GTX 1080 Ti 11GB
Blackmagic DeckLink Mini Monitor 4K
Blackmagic URSA Mini Pro
Blackmagic Pocket Cinema Camera
Blackmagic DaVinci Resolve Studio 15
Offline
User avatar

roger.magnusson

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

Re: Resolve 15 Scripting Feedback

PostSat Jun 16, 2018 7:33 pm

Very good points. Some more that I've encountered:
  • While there are several methods for setting up and executing renders, there's no way to actually set an output filename, it's always Untitled
  • In Beta 5 the Lua package.path changed and no longer contains the \Modules\Lua folder, meaning you can no longer automatically load modules from that user-scoped folder (tested on Windows)
  • The timeline frame rate can be set from a script, but there's no obvious way to set Drop Frame
Offline

MLanghausen

  • Posts: 131
  • Joined: Thu Jul 12, 2018 4:26 pm
  • Real Name: Michael Langhausen

Re: Resolve 15 Scripting Feedback

PostTue Sep 04, 2018 1:31 am

***Update***

I tried on my Mac Laptop - OS Sierra - and get the same behavior:
The other testing was done on Windows 10 OS

Tried removing the following line as well and still doesn't accept the new 'Resolution" settings

proj:SetSetting("timelineOutputResMismatchUseCustomPreset", tostring(0))
proj:SetSetting("timelineOutputResMismatchCustomPreset", "None")

***EndUpdate***

I'm unable to successfully change the "Output Scaling Resolution" or the "Custom" drop down
However, I can change the other "Output Scaling" settings.


Maybe the issue is that the following line, no matter how many times I manually change it and dump the table to see the changes, it always stays at "None" ????

timelineOutputResMismatchCustomPreset = None

Code: Select all
    local resolve = Resolve()
    local pm = resolve:GetProjectManager()
    local proj = pm:GetCurrentProject()


    proj:SetSetting("timelineOutputResMatchTimelineRes", tostring(0))
    proj:SetSetting("timelineOutputResMismatchUseCustomPreset", tostring(0))
    proj:SetSetting("timelineOutputResMismatchCustomPreset", "None")
    proj:SetSetting("timelineOutputResolutionWidth", "720")
    proj:SetSetting("timelineOutputResolutionHeight", "2000")
    proj:SetSetting("timelineOutputPixelAspectRatio", "square")
    proj:SetSetting("timelineOutputResMismatchBehavior", "scaleToCrop")

ASUS Prime X299 - Deluxe II
Intel Core i9 7980XE
80 GB DDR4 RAM
NVIDIA 3090Ti - Studio Driver
Intensity Pro 4k
Window 11 Pro

Resolve Studio 18.1.3 Build 8
Fusion Studio 17.3
Offline
User avatar

Igor Riđanović

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

Re: Resolve 15 Scripting Feedback

PostMon Oct 01, 2018 5:21 am

Using Python 2.7 I'm unable to set setting for timeline playback frame rate. For example:
Code: Select all
project.SetSetting('timelinePlaybackFrameRate, '24')


returns "False" although:
Code: Select all
project.GetSetting('timelinePlaybackFrameRate')


returns the current playback frame rate as string. This issue goes back before V15.1.
www.metafide.com - DaVinci Resolve™ Apps
Offline

firegreen

  • Posts: 7
  • Joined: Thu Oct 04, 2018 2:38 pm
  • Real Name: Steeve VINCENT

Re: Resolve 15 Scripting Feedback

PostMon Nov 05, 2018 12:02 pm

Hi,

Like Igor, I fail to set some project settings or item properties and I don't have any feedback from these functions :(.

Also, is it possible to add some functions for manipulating the timeline? Like renaming tracks and clips and defining clips ranges.

Thanks for replies :-)
Steeve
Offline
User avatar

robozb

  • Posts: 420
  • Joined: Wed Apr 17, 2019 6:48 am
  • Location: Hungary
  • Real Name: Roboz Bela Tamas

Re: Resolve 15 Scripting Feedback

PostSun Aug 25, 2019 12:19 am

Nick Verlinden wrote:[*]Currently, I'm missing the ability to get the selected clips on the active timeline to perform script wizardry onto.


missing very much
Offline
User avatar

iddos-l

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

Re: Resolve 15 Scripting Feedback

PostSun Aug 25, 2019 5:31 am

Is there a way to abort a long running script from the console?
Like ctr c in shell?
Offline
User avatar

robozb

  • Posts: 420
  • Joined: Wed Apr 17, 2019 6:48 am
  • Location: Hungary
  • Real Name: Roboz Bela Tamas

Re: Resolve 15 Scripting Feedback

PostSun Aug 25, 2019 9:28 am

It seems the resolve scripting is incredible basic and under documented, is good for only playing.
Offline

JazzMac251

  • Posts: 70
  • Joined: Sat Sep 01, 2018 10:07 pm
  • Real Name: Justin Schenk

Re: Resolve 15 Scripting Feedback

PostMon Oct 10, 2022 8:04 pm

Igor Riđanović wrote:Using Python 2.7 I'm unable to set setting for timeline playback frame rate. For example:
Code: Select all
project.SetSetting('timelinePlaybackFrameRate, '24')


returns "False" although:
Code: Select all
project.GetSetting('timelinePlaybackFrameRate')


returns the current playback frame rate as string. This issue goes back before V15.1.


Did anyone ever figure this out? I'm currently having this same issue on the Resolve 18 Python API. I can set the Output FR, but the playback FR ALWAYS returns false

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], FlyingAround, panos_mts, PourangKay, Uli Plank and 181 guests