Page 1 of 1

Move Playhead via script

PostPosted: Sun Dec 08, 2019 11:07 pm
by professorWM
Hello,

I have started to script resolve in python. Well there is not too much information available.
So I found out many thinks but some simple questions are still here:

Can some please tell how to move (and readout) the playhead position via python 3 script?

So when you know this you probably know also how to zoom in/out via python?

And possibly you also know how I can open the "Cut" page via script.
Well I know it for all other pages e.g. for media:

import DaVinciResolveScript as resolveScriptHandler
resolve=resolveScriptHandler.scriptapp("Resolve")
resolve.OpenPage("media")

resolve.OpenPage("cut") # this will not work :(

Many thanks guys.

Would be nice to get some help. Thanks.

Re: Move Playhead via script

PostPosted: Wed Dec 11, 2019 5:36 pm
by luke.whitehorn
You must set your environment variables first
Code: Select all
RESOLVE_SCRIPT_API="C:\\ProgramData\\Blackmagic Design\\DaVinci Resolve\\Support\\Developer\\Scripting\\"
RESOLVE_SCRIPT_LIB="C:\\Program Files\\Blackmagic Design\\DaVinci Resolve\\fusionscript.dll"
PYTHONPATH="${PYTHONPATH};${RESOLVE_SCRIPT_API}\\Modules\\"


Then use something like this:

Code: Select all
import DaVinciResolveScript as dvr_script

resolve = dvr_script.scriptapp("Resolve")
resolve.OpenPage('edit')


As for placing the playhead at a certain location, I don't think that is possible. The api is very limited :(

Re: Move Playhead via script

PostPosted: Wed Dec 11, 2019 6:05 pm
by professorWM
Many thanks for the answer.

Well in principle scripting is working.
So environment is OK. Even selecting a page works e.g. switching to "media" or "deliver" page. Only exception is switching to "cut" page. As this is the latest one maybe an bug in scripting lib.

Well I still hope there is way to move the head although you maybe right that scripting is very limited.

BMD anyone?

Re: Move Playhead via script

PostPosted: Wed Dec 11, 2019 9:22 pm
by luke.whitehorn
From the docs it looks like the 'cut' page is not available for some reason :/
Switches to indicated page in DaVinci Resolve. Input can be one of (“media”, “edit”, “fusion”, “color”, “fairlight”, “deliver”).