我试图延迟我的管道工具的一部分(在Maya启动期间运行)在注册VRay之后运行。在
我正在延迟初始化用户设置.py是这样的:
def run_my_tool():
import my_tool
reload(my_tool)
mc.evalDeferred("run_my_tool()")
我尝试在工具中使用evalDeferred来延迟render_settings脚本的执行,但它在注册VRay之前一直在运行。对于如何为VRay register事件创建侦听器,或者是什么事件,有什么想法?谢谢!在
编辑:
提出了一个新的主题来了解如何正确使用西奥多的条件/脚本作业命令建议here。在
技术部的尤伦-艺术家网教我如何正确地做这件事。这是一个link to the thread
以下是尤伦的帖子:
“除非必须,否则不要将python代码作为字符串传递。无论何时接受python回调(这在Maya的api中并非无处不在,但大多数情况下都是如此),请尝试以下方法之一:
““
相关问题 更多 >
编程相关推荐