I am trying to translate a piece of code I wrote from Python to Lua. I am using this code inside of compositing package Blackmagic Fusion.
Any help would be greatly appreciated!
Python script (working):
try:
comp.ActiveTool() # checks if a tool is selected
except:
print("nothing selected")
comp.AddTool("PolylineMask", -32768, -32768) # adds a tool if nothing's selected
Lua script (still not working and erroring):
if pcall (comp:ActiveTool()) then
print "Node Selected"
else
comp:AddTool("PolylineMask", -32768, -32768)
end