
- Posts: 1
- Joined: Sat Sep 30, 2023 12:24 pm
- Real Name: winston zhao
Hi,
I'm trying to write an external lua script following the documentation in README.txt.
I am using a M1 Mac on Ventura 13.4.1 and the version of my DaVinci Resolve Studio is V18.5 Build 41.
I have been able to get the external scripting to work with python 3.11.3 but I was hoping that I would be able to use Lua instead.
I'm currently just trying to get a "Hello World" to work.
The code below works for python executing from the same directory. './packages/main/src/scripts/index.py'.
I think there might be an environment variable issue as I've added the necessary variables, but think that maybe it's missing something like LUAPATH?
Thanks in advance for the help,
A Noob at DaVinci Resolve Scripting
I'm trying to write an external lua script following the documentation in README.txt.
I am using a M1 Mac on Ventura 13.4.1 and the version of my DaVinci Resolve Studio is V18.5 Build 41.
I have been able to get the external scripting to work with python 3.11.3 but I was hoping that I would be able to use Lua instead.
I'm currently just trying to get a "Hello World" to work.
- Code: Select all
resolve = Resolve()
projectManager = resolve:GetProjectManager()
project = projectManager:GetCurrentProject()
print("Project '"..project:GetName().."':")
and getting this issue ./packages/main/src/scripts/index.lua:1: attempt to call a nil value (global 'Resolve')
The code below works for python executing from the same directory. './packages/main/src/scripts/index.py'.
- Code: Select all
#!/usr/bin/env python
import DaVinciResolveScript as dvr
resolve = dvr.scriptapp("Resolve")
fusion = resolve.Fusion()
project_manager = resolve.GetProjectManager()
project = project_manager.GetCurrentProject()
print(project.GetName())
I think there might be an environment variable issue as I've added the necessary variables, but think that maybe it's missing something like LUAPATH?
- Code: Select all
Mac OS X:
RESOLVE_SCRIPT_API="/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting"
RESOLVE_SCRIPT_LIB="/Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/fusionscript.so"
PYTHONPATH="$PYTHONPATH:$RESOLVE_SCRIPT_API/Modules/"
Thanks in advance for the help,
A Noob at DaVinci Resolve Scripting