Need to get External Python Script to Resolve working

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

julanH

  • Posts: 3
  • Joined: Thu Jul 01, 2021 3:50 pm
  • Real Name: Julian Hansen

Need to get External Python Script to Resolve working

PostThu Jul 01, 2021 4:03 pm

We are trying to interact with Resolve / Fusion from an external python script.

Fusion Studio 9
DaVinci Resolve 15
Python 2.7.15
Python 3.9.5

We have read the README.txt provided here
C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting\README.txt

This document mentions setting up some Environment variables - which we have done and tested they are set correctly.

It then gives a sample script
Code: Select all
#!/usr/bin/env python
import DaVinciResolveScript as dvr_script
resolve = dvr_script.scriptapp("Resolve")
fusion = resolve.Fusion()
projectManager = resolve.GetProjectManager()
projectManager.CreateProject("Hello World")


In addition there are sample scripts provided here
C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting\Examples

When we try to run these through FuScript it does not work.
If we put a print of the resolve variable after the scriptapp("Resolve") call we get
None
If we change
Code: Select all
resolve = dvr_script.scriptapp("Resolve")

To
Code: Select all
fusion = dvr_script.scriptapp("Fusion")

and print the fusion var we get
FusionUI (0x0000000002C3D5C0) [App: 'Fusion' on 127.0.0.1, UUID: 6059386d-18e4-4a44-bbb2-f04de2576fcd]

But any attempt to do anything else with the fusion object results in

TypeError: 'NoneType' object is not callable

I believe we are missing something trivial but fundamental.

If anyone could provide insight / direction on how to fix this - we would greatly appreciate it.
Offline

Peter Chamberlain

Blackmagic Design

  • Posts: 14930
  • Joined: Wed Aug 22, 2012 7:08 am

Re: Need to get External Python Script to Resolve working

PostFri Jul 02, 2021 3:34 am

Do you have the Studio version?
DaVinci Resolve Product Manager
Offline

Shrinivas Ramani

Blackmagic Design

  • Posts: 3105
  • Joined: Wed Sep 20, 2017 10:19 am

Re: Need to get External Python Script to Resolve working

PostFri Jul 02, 2021 4:07 am

Hi

Resolve supports Python versions 2.7 and 3.6 - please check with the official installers from https://www.python.org/downloads/

Regards
Shrinivas
Offline

julanH

  • Posts: 3
  • Joined: Thu Jul 01, 2021 3:50 pm
  • Real Name: Julian Hansen

Re: Need to get External Python Script to Resolve working

PostFri Jul 02, 2021 1:15 pm

Peter Chamberlain wrote:Do you have the Studio version?

Of Fusion? Yes Fusion Studio 9
from the Help / About menu

Fusion Studio for Windows
Version: 9.02 Build 15
Offline

julanH

  • Posts: 3
  • Joined: Thu Jul 01, 2021 3:50 pm
  • Real Name: Julian Hansen

Re: Need to get External Python Script to Resolve working

PostFri Jul 02, 2021 1:22 pm

Shrinivas Ramani wrote:Hi

Resolve supports Python versions 2.7 and 3.6 - please check with the official installers from

Regards
Shrinivas


@Shrinivas we have both 2.7.15 and 3.9 - tried with both - same results.
When we try with the Console and select Py2 and type the instructions in manually from within Resolve - we get the same problem.
Offline
User avatar

Igor Riđanović

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

Re: Need to get External Python Script to Resolve working

PostFri Jul 02, 2021 11:21 pm

Are you on Synology NAS?
www.metafide.com - DaVinci Resolve™ Apps

Return to DaVinci Resolve

Who is online

Users browsing this forum: AndrewTheGreat, Bing [Bot], Google [Bot], Mike Manus, panos_mts and 326 guests