标签: blackmagic-fusion

如何将Python脚本转换为Lua脚本?

我试图将我用Python编写的一段代码翻译成Lua.我在合成包Blackmagic Fusion中使用此代码.

任何帮助将不胜感激!

Python脚本(工作):

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
Run Code Online (Sandbox Code Playgroud)

Lua脚本(仍然没有工作和错误):

if pcall (comp:ActiveTool()) then
    print "Node Selected"
else
   comp:AddTool("PolylineMask", -32768, -32768)
end
Run Code Online (Sandbox Code Playgroud)

python error-handling lua try-catch blackmagic-fusion

3
推荐指数
1
解决办法
1740
查看次数