I just got Draft installed with 5.2 49424 and Im trying to get it running. I tried it out of the box and got this error.
0: STDOUT: Traceback (most recent call last):
0: STDOUT: File “\durandal\DeadlineRepository5_2\plugins\Draft\Draft.py”, line 1, in
0: STDOUT: from System import *
0: STDOUT: ImportError: No module named System
0: INFO: Process exit code: 1
Can anyone point me to some information to get through the basics? Just looking to generate a slate with an image and make a quicktime out of my .exr’s
I believe you will need to change which Draft script you’re using. Perhaps try this Draft Script: \durandal\DeadlineRepository5_2\Draft\Samples\Encode\Resizable_Demo_Template2.py
To submit this Draft job using the Deadline Monitor:
Open the Deadline Monitor
From the Submit menu, choose Submit Draft Job To Deadline
In the “Submit Draft Script To Deadline” dialog:
[list=1][*]In the Draft Script field, enter: \durandal\DeadlineRepository5_2\Draft\Samples\Encode\Resizable_Demo_Template2.py
In the Input File field, choose an EXR file sequence. This should set the Output File Name and Frame List fields automatically.
While I got you…
It seems like the user has to type in the user name and version number. How can i grab this information from deadline already? Deadline knows the username and I would like to use the 3dsmax filename as the version #. Where would i code this and how?
thanks.
You’ll need to edit the Draft script you’re using, for example, \durandal\DeadlineRepository5_2\Draft\Samples\Encode\Resizable_Demo_Template2.py . You’ll probably want to copy the script and edit the copy, instead of changing the original script.
For the username:
Add this line along with the other import startments near the top of the script:
import xml.etree.ElementTree as xml
Add this function after the “import” and “from … import …” lines, if it isn’t there already. This function will put all your Deadline job properties into a dictionary:#Returns a dictionary of a Deadline Job's properties
def getDeadlineJob (job, repository):
deadlineJobPath = (repository + "\\jobs\\" + job + "\\" + job + ".job")
jobKeys = (xml.parse(deadlineJobPath)).getroot()
jobDict = {}
for o in list(jobKeys):
if len(o.getchildren()) < 1:
jobDict[o.tag] = o.text
else:
jobDict[o.tag] = []
for t in list(o):
(jobDict[o.tag]).append(t.text)
jobDict['deadlineJobPath'] = deadlineJobPath
return jobDict
Add this line after the “params = ParseCommandLine …” line:
jobParams = getDeadlineJob( params['deadlineJobID'], params['deadlineRepository'] )
Finally, find the line:
annotation = Image.CreateAnnotation(params['username'], annotationInfo)
and replace it with:
annotation = Image.CreateAnnotation(jobParams.get('SubmitUserName', ''), annotationInfo)
I’m not sure about the version number. I will forward this question to someone who should know, but I believe he is away until the New Year.
Ok, great! This was helpful. The script im working with was based off another so the code is a little different. My annotations look like this.
slateAnnotations = [
(“SHOW”, jobParams.get(‘ExtraInfo1’, ‘’)), #This line is skipped if there is not ExtraInfo1
(“EPISODE”, params.get(‘episode’, ‘’)), #This line is skipped if ‘episode’ isn’t in the extra args
(“SHOT”, params[‘entity’]),
(“FRAMES”, params[‘frameList’]),
(“HANDLES”, params.get(‘handles’, ‘’)), #This line is skipped if ‘handles’ isn’t in the extra args
(“VERSION”, params[‘version’]),
("",’’),
("",’’),
(“ARTIST”, params[‘username’]),
(“DATE/TIME”, datetime.datetime.now().strftime("%m/%d/%Y %I:%M %p") )
So i replaced (“ARTIST”, params[‘username’]), with (“ARTIST”, jobParams.get(‘SubmitUserName’, ‘’), Ill see if that works
As for version, im just looking for the deadline job name. Im assuming its “SubmitJobName”?
Since we wrote that script, we added a ‘deadlineRepository’ parameter, so you can replace those deadlineRepo lines with:#Path to the Deadline Repository root
deadlineRepo = params['deadlineRepository']Make sure you put this somewhere after the “params = ParseCommandLine( …” line. Our sample scripts in \durandal\DeadlineRepository5_2\Draft\Samples\Encode already include this change, along with some bug fixes. I should probably update or remove the scripts we posted on the forum.
Could you please open the Deadline Monitor, and take a look at the Job Error Report for your Draft job? The last two dozen lines or so should give us some information about the error. The useful lines normally start with “0: STDOUT: Traceback (most recent call last):”.
Heres the error- although its not clear what went wrong
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Looking for bundled python at: 'C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe'
0: INFO: Render Executable: "C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe"
0: INFO: Render Argument: -u "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render123\jobsData\Simple_Slate_h264_24fps_BENT_test.py" username="" entity="" version="" width=1280 height=720 frameList=0-2 startFrame=0 endFrame=2 inFile="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Testing_###.exr" outFile="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov" outFolder="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft" deadlineJobID=001_050_004_3f7ad425 deadlineRepository="\\durandal\DeadlineRepository5_2"
0: INFO: Startup Directory: "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render123\Draft"
0: INFO: Process Priority: BelowNormal
0: INFO: Process Affinity: default
0: INFO: Process is now running
0: STDOUT: Checking for license at @durandal
0: STDOUT: Draft 1.0.0.49258
0: STDOUT: Command line args:
0: STDOUT: username=
0: STDOUT: entity=
0: STDOUT: version=
0: STDOUT: width=1280
0: STDOUT: height=720
0: STDOUT: frameList=0-2
0: STDOUT: startFrame=0
0: STDOUT: endFrame=2
0: STDOUT: inFile=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Testing_###.exr
0: STDOUT: outFile=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov
0: STDOUT: outFolder=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft
0: STDOUT: deadlineJobID=001_050_004_3f7ad425
0: STDOUT: deadlineRepository=\\durandal\DeadlineRepository5_2
0: STDOUT: Warning: Deprecated! CompositeWithPositionAndGravity has been replaced by CompositeWithPositionAndAnchor.
0: STDOUT: Traceback (most recent call last):
0: STDOUT: File "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render123\jobsData\Simple_Slate_h264_24fps_BENT_test.py", line 153, in <module>
0: STDOUT: annotation = Draft.Image.CreateAnnotation( slateAnnotations[i][1], annotationInfo )
0: STDOUT: Boost.Python.ArgumentError: Python argument types in
0: STDOUT: Image.CreateAnnotation(NoneType, AnnotationInfo)
0: STDOUT: did not match C++ signature:
0: STDOUT: CreateAnnotation(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > text, class py_draft_utils::annotation_info {lvalue} textInfo)
0: STDOUT: Output #0, mov, to '\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov':
0: STDOUT: Metadata:
0: STDOUT: encoder : Lavf54.29.104
0: STDOUT: Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1920x1080, q=2-31, 115000 kb/s, 24 tbn, 24 tbc
0: STDOUT: [libx264 @ 0000000001C09520] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
0: STDOUT: [libx264 @ 0000000001C09520] profile Constrained Baseline, level 3.2
0: STDOUT: [libx264 @ 0000000001C09520] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyright 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=3 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=3 rc=abr mbtree=1 bitrate=10000 ratetol=1.0 qcomp=0.60 qpmin=4 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
0: STDOUT: Output #0, mov, to '\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing-h264.mov':
0: STDOUT: Metadata:
0: STDOUT: encoder : Lavf54.29.104
0: STDOUT: Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p, 960x540, q=4-51, 10000 kb/s, 24 tbn, 24 tbc
0: STDOUT: [libx264 @ 0000000001C09520] final ratefactor: 5.62
0: INFO: Process exit code: 1
0: An exception occurred: Exception during render: An error occurred in RenderTasks(): Error in CheckExitCode(): Renderer returned non-zero error code, 1. Check the log for more information.
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage) (Deadline.Plugins.RenderPluginException)
Ill try to make sure my order matches yours. Maybe ill try the sample and work off that. (No luck on that either. using the example script threw a similar error. I get an empty 1 kb quicktime)
Just to wrap up as I leave for the day (Thanks for the help Paul) It seems like the draft script worked before it got access to the deadline repository. Made a quicktime and everything (minus the annotation data) Once I give it a path to the respository, then it doesnt work. Heres the full error code. This one is from the sample file included with deadline this time. Not the one off the forum.
0: Plugin will be reloaded because a new job has been loaded, or one of the job files has been modified
0: Loaded plugin: Draft
0: Task timeout is disabled.
0: Loaded job: TestComp_v01.nk [DRAFT] (006_050_004_7f087555)
0: INFO: StartJob: initializing script plugin Draft
0: INFO: Found Draft python module at: 'C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render121\Draft\Draft.pyd'
0: INFO: About: Draft Plugin for Deadline
0: Plugin rendering frame(s): 0
0: INFO: Draft job starting...
0: INFO: Stdout Handling Enabled: False
0: INFO: Popup Handling Enabled: False
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Looking for bundled python at: 'C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe'
0: INFO: Render Executable: "C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe"
0: INFO: Render Argument: -u "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render121\jobsData\simple_slate_h264_burnins_with_proxy_BENT.py" username="" entity="" version="" width=1280 height=720 frameList=0-2 startFrame=0 endFrame=2 inFile="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Testing_###.exr" outFile="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov" outFolder="\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft" deadlineJobID=001_050_004_60b23355 deadlineRepository="\\durandal\DeadlineRepository5_2"
0: INFO: Startup Directory: "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render121\Draft"
0: INFO: Process Priority: BelowNormal
0: INFO: Process Affinity: default
0: INFO: Process is now running
0: STDOUT: Checking for license at @Durandal
0: STDOUT: Draft 1.0.0.49258
0: STDOUT: Command line args:
0: STDOUT: username=
0: STDOUT: entity=
0: STDOUT: version=
0: STDOUT: width=1280
0: STDOUT: height=720
0: STDOUT: frameList=0-2
0: STDOUT: startFrame=0
0: STDOUT: endFrame=2
0: STDOUT: inFile=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Testing_###.exr
0: STDOUT: outFile=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov
0: STDOUT: outFolder=\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft
0: STDOUT: deadlineJobID=001_050_004_60b23355
0: STDOUT: deadlineRepository=\\durandal\DeadlineRepository5_2
0: STDOUT: Traceback (most recent call last):
0: STDOUT: File "C:\Documents and Settings\svcrender\Local Settings\Application Data\Thinkbox\Deadline\slave\Render121\jobsData\simple_slate_h264_burnins_with_proxy_BENT.py", line 113, in <module>
0: STDOUT: annotation = Draft.Image.CreateAnnotation( slateAnnotations[i][1], annotationInfo )
0: STDOUT: Boost.Python.ArgumentError: Python argument types in
0: STDOUT: Image.CreateAnnotation(NoneType, AnnotationInfo)
0: STDOUT: did not match C++ signature:
0: STDOUT: CreateAnnotation(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > text, class py_draft_utils::annotation_info {lvalue} textInfo)
0: STDOUT: [libx264 @ 0000000001C08C80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
0: STDOUT: [libx264 @ 0000000001C08C80] profile Constrained Baseline, level 4.0
0: STDOUT: [libx264 @ 0000000001C08C80] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyright 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=3 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=3 rc=crf mbtree=1 crf=18.3 qcomp=0.60 qpmin=4 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
0: STDOUT: Output #0, mov, to '\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing.mov':
0: STDOUT: Metadata:
0: STDOUT: encoder : Lavf54.29.104
0: STDOUT: Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p, 1920x1080, q=4-51, 24 tbn, 24 tbc
0: STDOUT: [libx264 @ 0000000001C09520] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
0: STDOUT: [libx264 @ 0000000001C09520] profile Constrained Baseline, level 3.1
0: STDOUT: [libx264 @ 0000000001C09520] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyright 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=3 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=3 rc=crf mbtree=1 crf=18.3 qcomp=0.60 qpmin=4 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
0: STDOUT: Output #0, mov, to '\\bentfile02\3ds_Max_2013_testing\SHOTS\CJTEST_SHOT_01\EDIT_RENDERS\Draft\Testing-proxy.mov':
0: STDOUT: Metadata:
0: STDOUT: encoder : Lavf54.29.104
0: STDOUT: Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p, 960x540, q=4-51, 24 tbn, 24 tbc
0: INFO: Process exit code: 1
0: An exception occurred: Exception during render: An error occurred in RenderTasks(): Error in CheckExitCode(): Renderer returned non-zero error code, 1. Check the log for more information.
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage) (Deadline.Plugins.RenderPluginException)
Would it be possible for you to please send us a copy of your “Simple_Slate_h264_24fps_BENT_test.py” script? You can either attach the file to a reply on this forum, or send it to us using our ticket system. You’ll need to put the script in a ZIP file to get it through our ticket system.
has the problem that slateAnnotations[i][1] is not assigned (it’s giving NoneType). I’m at home, and don’t have the script here. I recommend that you add a debug print statement to find out what the value of i is, and then look back earlier in the code to see what should have been assigned to that location in the 2D array.
I changed this loop to start with a 1 instead of a zero and it seemed to work.
for i in range( 1, len( slateAnnotations ) ):
print( "i value = %d" % i )
annotationTuple = slateAnnotations[i
Found the filename, username and everything! I’m back on track for now. Its probably doing something else wrong, but hey. Im making progress. I sent that script in with a support ticket. Keep in mind, I made if off an example and didnt change that loop calue.
Thank you! There is a bug in our script that affects the i = 0 case. Here is my current fix for that loop (I added “or annotationTuple[1] is None” to the if condition):[code]for i in range( 0, len( slateAnnotations ) ):
annotationTuple = slateAnnotations[i]
if ( annotationTuple[1] == "<SKIP>" or annotationTuple[1] is None ):
skipLines += 1
continue[/code]
Thanks again for helping us get a working Draft script here in our production. This tool is fantastic and has already saved a lot of “quicktime making” hours. I thought I’d post the final script that was successful.
Next…
ProRes support. I read that Draft uses some version of ffmpg, and its even written that is supports ProRes, but when I tried to call for that codec, it failed. I read in another post that prores might not be working yet. Can anyone clear this up for me?
Stereo SidebySide- I saw that there is a call for making side by side movies automatically too, but the code looks very different than the one in my script. Any of you python draft experts want to edit this script to support side by side stereo? Or art least point me in the right direction.
We are currently in discussion with Apple regarding licensing ProRes for Draft.
I’m working on modifying your script to do the side-by-side stereo. I’ve started off by simplifying it: getDeadlineJob and FrameListToFrames are unnecessary in your script, because they are now in DraftParamParser as GetDeadlineJobProperties (but with the parameters in the opposite order) and FrameRangeToFrames.
Paul and I have been chatting, and we have some questions about how you want the side-by-side stereo to work.
The cookbook example at http://www.thinkboxsoftware.com/draft-create-side-by-side/ assumes that the filename is being used to distinguish between left & right eyes, but there’s alternate ways of doing it. Would you be using filenames too, or left & right subdirectories, or another method? And, if using filenames, what format would you be using?
For the slates at the beginning, would you also want those duplicated for left & right eye, or use wider slates across the whole frame?
We have the code ready for when the licence is approved, we’re just waiting for the approval.