我在macOS Mojave上使用Nuke11.3v4。这里有一个问题:我不能使用新的class2节点Text2
。每次我选择它-我的应用程序预期退出。我只有在macOS上才会有这种行为。在Windows和Linux上运行良好。所以我编写了一个小脚本来解决这个问题(我想使用旧的Text
节点而不是新的Text2
节点)。但我的剧本不行。为什么?你知道吗
menu.py
文件中的代码:
import os
import sys
import nuke
toolbar = nuke.menu('Nodes')
if os.name == 'posix' and sys.platform == 'darwin':
toolbar.addCommand('Draw/Text', 'nuke.createNode("Text")', 'crtl+alt+shift+t', icon='Text.png')
nuke.message("Oops! Only Text1 node is accessible.")
else:
toolbar.addCommand('Draw/Text', 'nuke.createNode("Text2")', 'crtl+alt+shift+t', icon='Text.png')
nuke.message("Fine! Text2 node's ready for use.")
我解决了这个问题。它只是我代码中的一个
typo
:而不是:
这是调用
Text
节点的快捷方式:Ctrl-Alt-Shift-T
希望这有帮助。你知道吗
相关问题 更多 >
编程相关推荐