GetResolve returns None for internal scripts

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

gregory_01

  • Posts: 4
  • Joined: Wed May 31, 2023 3:22 pm
  • Real Name: Gregory Libert

GetResolve returns None for internal scripts

PostWed May 31, 2023 4:07 pm

Hi,

I have tried to run a script in Davinci resolve by putting it under the folder "Blackmagic Design\DaVinci Resolve\Fusion\Scripts\Utility" and by accessing it in the Davinci resolve app (Workspace -> Scripts)

Unfortunately, the GetResolve() method returns none, and I struggle to understand why. I use the free version, but as I understand it, the script should work if it is run with the app.

I am on Windows.

Here is the script:
Code: Select all
import os
from python_get_resolve import GetResolve


api = os.getenv('RESOLVE_SCRIPT_API')
lib = os.getenv('RESOLVE_SCRIPT_LIB')
path = os.getenv('PYTHONPATH')
print('RESOLVE_SCRIPT_API: ' + api)
print('RESOLVE_SCRIPT_LIB: ' + lib)
print('PYTHONPATH: ' + path)

resolve = GetResolve()
print(resolve)


Here is the result in the console:

Code: Select all
RESOLVE_SCRIPT_API: C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting;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\;C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting\Modules

None


Many thanks in advance
Offline
User avatar

Andrew Hazelden

  • Posts: 536
  • Joined: Sat Dec 06, 2014 12:10 pm
  • Location: West Dover, Nova Scotia, Canada

Re: GetResolve returns None for internal scripts

PostThu Jun 01, 2023 1:12 am

gregory_01 wrote:I use the free version, but as I understand it, the script should work if it is run with the app.


Try using this instead:
Code: Select all
resolve = app.GetResolve()
Mac Studio M2 Ultra / Threadripper 3990X | Fusion Studio 18.6.4 | Kartaverse 6
Offline

gregory_01

  • Posts: 4
  • Joined: Wed May 31, 2023 3:22 pm
  • Real Name: Gregory Libert

Re: GetResolve returns None for internal scripts

PostThu Jun 01, 2023 11:00 am

Thanks, it worked
Offline
User avatar

Igor Riđanović

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

Re: GetResolve returns None for internal scripts

PostThu Jun 01, 2023 8:06 pm

You don't need to make the resolve instance when running scripts internally. Your entire script can be simplified to this:
Code: Select all
print(resolve)
www.metafide.com - DaVinci Resolve™ Apps

Return to DaVinci Resolve

Who is online

Users browsing this forum: creatubers, Google [Bot], panos_mts, Raxyzz, Simnut and 242 guests