Differences
This shows you the differences between two versions of the page.
— | appwiki:deadline [2021/08/28 08:09] (current) – created ying | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Deadline Basic ====== | ||
+ | * Deadline is a render manage application, | ||
+ | * Deadline needs all machine can access a common network shared drive, one for all project, one for its repo which holds all the config and setting and tools under Deadline. | ||
+ | * The " | ||
+ | * under its repo/, it has | ||
+ | * repo/ | ||
+ | * repo/ | ||
+ | * There are several applications under it to form the Deadline system | ||
+ | * Deadline Monitor: the overview list app to view and submit job in one location | ||
+ | * Tool (check Super user mode) > Configure Repository Option > web service settings : shows it listening port for web RESTful api info | ||
+ | |||
+ | ====== Python Scripting for Deadline ====== | ||
+ | |||
+ | * command in windows <code dos> | ||
+ | cd " | ||
+ | deadlinecommand.exe --version | ||
+ | |||
+ | REM get job detail and put into text | ||
+ | " | ||
+ | |||
+ | REM get slave names of a pool, return a list of slave machine names | ||
+ | " | ||
+ | |||
+ | REM job list | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | * Python can be used for commanding the Deadline system, also can be used to Post-render/ | ||
+ | |||
+ | ====== Get Submission Info ====== | ||
+ | * mel process (SubmitMayaToDeadline.mel) | ||
+ | - submit job label (9163 line) > SetupSubmission() | ||
+ | - submit job label (next to Pipeline tool) @ 10743 > DeadlineSubmitterOnOk() > SetupSubmission() | ||
+ | | ||
+ | |||
+ | * for commandline | ||
+ | <code python> | ||
+ | # get deadline cmd exe path | ||
+ | dl_cmd = os.path.normpath( os.path.join(os.environ[' | ||
+ | |||
+ | # use deadline cmd to get deadline system info | ||
+ | cmd = r'" | ||
+ | |||
+ | # note: the original mel code, put " 2> nul" at the end of the cmd, which means no err output, and only 1st output/the result to the string. | ||
+ | # so they don't need 2 variable like bellow to catch the return values. | ||
+ | |||
+ | info=subprocess.Popen(cmd, | ||
+ | out, err = info.communicate() | ||
+ | exitcode = info.returncode | ||
+ | |||
+ | # read data | ||
+ | import json | ||
+ | dl_data = json.loads(out) | ||
+ | deadlineSubmissionInfo=dl_data[' | ||
+ | |||
+ | # pool list | ||
+ | pool_list = deadlineSubmissionInfo[' | ||
+ | |||
+ | </ | ||
+ | |||
+ | * for existing maya deadline scene, the attribute is stored at defaultRenderGlobals <code python> | ||
+ | # for existing deadline scene | ||
+ | cmds.getAttr(' | ||
+ | # all the attribute saving is at SavePersistentDeadlineOptions() in mel | ||
+ | </ | ||
+ | * other maya info <code python> | ||
+ | # current renderer | ||
+ | renderer = cmds.getAttr(' | ||
+ | # current render layer | ||
+ | currentRenderLayer = cmds.editRenderLayerGlobals(q=1, | ||
+ | # render animation? | ||
+ | render_animation = cmds.getAttr(" | ||
+ | |||
+ | # Get frame list 1-3 style | ||
+ | frameList = str( int(cmds.currentTime(q=1)) ) | ||
+ | if render_animation: | ||
+ | fromFrame = int( cmds.getAttr(' | ||
+ | toFrame = int( cmds.getAttr(' | ||
+ | byFrame = int( cmds.getAttr(' | ||
+ | | ||
+ | frameList = fromFrame | ||
+ | if fromFrame != toFrame: | ||
+ | frameList = " | ||
+ | if byFrame > 1: | ||
+ | frameList = " | ||
+ | </ |