我正在尝试通过 Deadline Software 将 Maya 渲染发送到渲染农场.
用于在截止日期前手动提交 Maya 作业的 Python 命令。
import sys
import subprocess
import maya.cmds as cmds
deadline = "C:\\Program Files\\Thinkbox\\Deadline\\bin\\deadlinecommand.exe"
maya_exe = "C:\\Program Files\\Autodesk\\Maya2015\\bin\\render.exe"
file_path = cmds.file(q=True, location=True)
command = '%s ' \
'-SubmitCommandLineJob ' \
'-executable "%s" ' \
'-name "File Name" ' \
'"%s" ' % (deadline, maya_exe, file_path)
process = subprocess.Popen(command, stdout=subprocess.PIPE)
lines_iterator = iter(process.stdout.readline, b"")
for line in lines_iterator:
print(line)
sys.stdout.flush()
有任何Python方法可以将maya渲染添加到截止日期..?
最佳答案
我在maya内编写了一个用于nuke作业的导出器。它也应该与 Maya 一起使用(即使我不明白你没有使用截止日期脚本 - 请注意,nuke 的截止日期在 .py 中有一个提交者):
我正在使用 xml 编辑两个部分文件: nuke_submit_info.job nuke_plugin_info.job 为 Maya 找到相同的文件,它应该可以解决问题
然后使用“deadlinecommand”提交它们
def sumbit2deadline():
FileName = "nuke_submit_info"
JobInfo = PathSaveFiles + FileName + ".job"
FileName = "nuke_plugin_info"
JobPlugIn = PathSaveFiles + FileName + ".job"
FileName = "NukeTemplate"
JobFile = PathSaveFiles + FileName + ".nk"
command = "deadlinecommand" + " " + JobInfo + " " + JobPlugIn + " " + JobFile
subprocess.Popen(command)
关于python - Maya 截止作业提交 python 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37404111/