- Posts: 78
- Joined: Mon Feb 24, 2020 5:44 pm
- Real Name: Ben Traje
I've heard that it might be possible to execute Python code in Frame Render Scripts, but I was unable to do so in my own testing. I know you can do either of:
- Code: Select all
comp:Execute("!Py: print('Hello from Python')")
comp:RunScript("/path/to/pythonscript.py")
Just for fun I did some playing about with JSON in Lua. Firstly I saved the following JSON file:
- Code: Select all
[
[1,10 ],
[2,30 ],
[3,40 ]
]
- Code: Select all
Fusion Studio:
/Library/Application Support/Blackmagic Design/Fusion/Modules/Lua
DaVinci Resolve:
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Modules/Lua
- Code: Select all
%APPDATA%\Blackmagic Design\DaVinci Resolve\Fusion\Modules\Lua
- Code: Select all
lunajson.lua
lunajson/
- Code: Select all
lunajson = require 'lunajson'
file = io.open("/Users/tomj/sample_data.json", "r"):read("*all")
jsonparse = lunajson.decode ( file )
for k, v in ipairs(jsonparse) do
if v[1] == comp.CurrentTime then TopLeftAlpha = v[2] end
end
Just a quick hack/demo, probably much better ways to do it. But that did function OK.