AWS Thinkbox Discussion Forums

Quick Draft errors

Hi,

I’m trying to get a Quick Draft to change an exr tile rendering job to a .jpg when the Draft Tile Assembler has completed, but i’m running into problems getting it working.

I have a custom script that submits a precalc job in 3dsmax/vray, then the actual tile render job, and the Draft Tile Assembly job combines it all back together.

I’ve figured out that the Quick Draft event will fire when I use the KeyValuePairs in the submission script:

SMTDSettings.ExtraInfoKeyValues = #(#("SubmitQuickDraft","True"), #("DraftCodec","jpeg"), #("DraftExtension","jpg"), #("DraftQuality","85"), #("DraftType","image") )

This however only seems to work for the precalc job (as it is one image), and I can’t figure out how to add it to the Draft Tile Assembly job extrainfo parameters via the submission script.

If I manually add the key values to the DTA job on the monitor, the Quick Draft will start but will throw up lots of errors:

[code]=======================================================
Error

Error: Renderer returned non-zero error code, 1. Check the log for more information.
at Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type

RenderPluginException

=======================================================
Stack Trace

at Deadline.Plugins.SandboxedPlugin.a(DeadlineMessage A_0)
at Deadline.Plugins.SandboxedPlugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)

=======================================================
Log

2017-07-06 13:15:05: 0: Loading Job’s Plugin timeout is Disabled
2017-07-06 13:15:07: 0: Executing plugin command of type ‘Sync Files for Job’
2017-07-06 13:15:07: 0: All job files are already synchronized
2017-07-06 13:15:07: 0: Plugin DraftPlugin was already synchronized.
2017-07-06 13:15:07: 0: Done executing plugin command of type ‘Sync Files for Job’
2017-07-06 13:15:07: 0: Executing plugin command of type ‘Initialize Plugin’
2017-07-06 13:15:08: 0: INFO: Executing plugin script ‘C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\plugins\595e292a355e4c054c99faf6\DraftPlugin.py’
2017-07-06 13:15:08: 0: INFO: Found Draft python module at: ‘C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft\Draft.pyd’
2017-07-06 13:15:08: 0: INFO: About: Draft Plugin for Deadline
2017-07-06 13:15:08: 0: INFO: Render Job As User disabled, running as current user ‘Jaime’
2017-07-06 13:15:08: 0: INFO: The job’s environment will be merged with the current environment before rendering
2017-07-06 13:15:08: 0: Done executing plugin command of type ‘Initialize Plugin’
2017-07-06 13:15:09: 0: Start Job timeout is disabled.
2017-07-06 13:15:09: 0: Task timeout is disabled.
2017-07-06 13:15:09: 0: Loaded job: newdeadline (Render) - jobName Draft Tile Assembly [Quick Draft] (595e292a355e4c054c99faf6)
2017-07-06 13:15:09: 0: Successfully mapped X: to //piknas003/Assets
2017-07-06 13:15:09: 0: Successfully mapped Y: to //piknas003/Resources
2017-07-06 13:15:09: 0: Successfully mapped Z: to //piknas003/Projects
2017-07-06 13:15:09: 0: Executing plugin command of type ‘Start Job’
2017-07-06 13:15:09: 0: Done executing plugin command of type ‘Start Job’
2017-07-06 13:15:09: 0: Plugin rendering frame(s): 0-1
2017-07-06 13:15:09: 0: Executing plugin command of type ‘Render Task’
2017-07-06 13:15:09: 0: INFO: Draft job starting…
2017-07-06 13:15:09: 0: INFO: Stdout Redirection Enabled: True
2017-07-06 13:15:09: 0: INFO: Stdout Handling Enabled: True
2017-07-06 13:15:09: 0: INFO: Popup Handling Enabled: False
2017-07-06 13:15:09: 0: INFO: Using Process Tree: True
2017-07-06 13:15:09: 0: INFO: Hiding DOS Window: True
2017-07-06 13:15:09: 0: INFO: Creating New Console: False
2017-07-06 13:15:09: 0: INFO: Running as user: Jaime
2017-07-06 13:15:09: 0: INFO: Looking for bundled python at: ‘C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe’
2017-07-06 13:15:09: 0: INFO: Executable: “C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe”
2017-07-06 13:15:09: 0: INFO: Argument: -u “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\jobsData\595e292a355e4c054c99faf6\QuickDraft.py” resolution="" codec=“jpeg” quality=“85” colorSpaceIn=“None” colorSpaceOut=“None” annotationsFilePath="“None”" annotationsFramePaddingSize=“None” isDistributed=“False” quickType=“createImages” frameList=0-1 startFrame=0 endFrame=1 inFile="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.exr" outFile="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.jpg" outFolder="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ" deadlineJobID=595e28c7355e4c60acf71bec deadlineRepository="\wks15\repo" taskStartFrame=0 taskEndFrame=1
2017-07-06 13:15:09: 0: INFO: Full Command: “C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe” -u “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\jobsData\595e292a355e4c054c99faf6\QuickDraft.py” resolution="" codec=“jpeg” quality=“85” colorSpaceIn=“None” colorSpaceOut=“None” annotationsFilePath="“None”" annotationsFramePaddingSize=“None” isDistributed=“False” quickType=“createImages” frameList=0-1 startFrame=0 endFrame=1 inFile="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.exr" outFile="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.jpg" outFolder="\piknas003\Projects\2017\R_n_D_newdeadline\TestJ" deadlineJobID=595e28c7355e4c60acf71bec deadlineRepository="\wks15\repo" taskStartFrame=0 taskEndFrame=1
2017-07-06 13:15:09: 0: INFO: Startup Directory: “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft”
2017-07-06 13:15:09: 0: INFO: Process Priority: BelowNormal
2017-07-06 13:15:09: 0: INFO: Process Affinity: default
2017-07-06 13:15:09: 0: INFO: Process is now running
2017-07-06 13:15:10: 0: STDOUT: Appending “//wks15/repo/events/DraftEventPlugin/DraftQuickSubmission” to system path to import Quick Draft scripts
2017-07-06 13:15:10: 0: STDOUT: Command line args:
2017-07-06 13:15:10: 0: STDOUT: resolution=
2017-07-06 13:15:10: 0: STDOUT: codec=jpeg
2017-07-06 13:15:10: 0: STDOUT: quality=85
2017-07-06 13:15:10: 0: STDOUT: colorSpaceIn=None
2017-07-06 13:15:10: 0: STDOUT: colorSpaceOut=None
2017-07-06 13:15:10: 0: STDOUT: annotationsFilePath=None
2017-07-06 13:15:10: 0: STDOUT: annotationsFramePaddingSize=None
2017-07-06 13:15:10: 0: STDOUT: isDistributed=False
2017-07-06 13:15:10: 0: STDOUT: quickType=createImages
2017-07-06 13:15:10: 0: STDOUT: frameList=0-1
2017-07-06 13:15:10: 0: STDOUT: startFrame=0
2017-07-06 13:15:10: 0: STDOUT: endFrame=1
2017-07-06 13:15:10: 0: STDOUT: inFile=\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.exr
2017-07-06 13:15:10: 0: STDOUT: outFile=\piknas003\Projects\2017\R_n_D_newdeadline\TestJ\TestJ.RGB_color.jpg
2017-07-06 13:15:10: 0: STDOUT: outFolder=\piknas003\Projects\2017\R_n_D_newdeadline\TestJ
2017-07-06 13:15:10: 0: STDOUT: deadlineJobID=595e28c7355e4c60acf71bec
2017-07-06 13:15:10: 0: STDOUT: deadlineRepository=\wks15\repo
2017-07-06 13:15:10: 0: STDOUT: taskStartFrame=0
2017-07-06 13:15:10: 0: STDOUT: taskEndFrame=1
2017-07-06 13:15:10: 0: STDOUT: Checking for a license…
2017-07-06 13:15:10: 0: STDOUT: Draft 1.6.4
2017-07-06 13:15:10: 0: STDOUT: Traceback (most recent call last):
2017-07-06 13:15:10: 0: STDOUT: File “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\jobsData\595e292a355e4c054c99faf6\QuickDraft.py”, line 65, in
2017-07-06 13:15:10: 0: STDOUT: CreateImages( params )
2017-07-06 13:15:10: 0: STDOUT: File “//wks15/repo/events/DraftEventPlugin/DraftQuickSubmission\DraftCreateImages.py”, line 24, in CreateImages
2017-07-06 13:15:10: 0: STDOUT: params = ParseParams( expectedTypes, params )
2017-07-06 13:15:10: 0: STDOUT: File “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft\DraftParamParser.py”, line 123, in ParseParams
2017-07-06 13:15:10: 0: STDOUT: params[key] = TypeCastArg( expectedTypes[key], params[key] )
2017-07-06 13:15:10: 0: STDOUT: File “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft\DraftParamParser.py”, line 95, in TypeCastArg
2017-07-06 13:15:10: 0: STDOUT: return float(arg)
2017-07-06 13:15:10: 0: STDOUT: ValueError: could not convert string to float:
2017-07-06 13:15:10: 0: INFO: Process exit code: 1
2017-07-06 13:15:10: 0: Done executing plugin command of type ‘Render Task’

=======================================================
Details

Date: 07/06/2017 13:15:12
Frames: 0-1
Elapsed Time: 00:00:00:08
Job Submit Date: 07/06/2017 13:12:26
Job User: jaime
Average RAM Usage: 10250670080 (60%)
Peak RAM Usage: 10250670080 (60%)
Average CPU Usage: 17%
Peak CPU Usage: 32%
Used CPU Clocks (x10^6 cycles): 11115
Total CPU Clocks (x10^6 cycles): 65381

=======================================================
Slave Information

Slave Name: WKS15
Version: v9.0.5.0 Release (d7db21feb)
Operating System: Windows 7 Professional (SP1)
Running As Service: No
Machine User: Jaime
IP Address: 10.3.222.15
MAC Address: 00:16:4B:4B:B0:BD
CPU Architecture: x64
CPUs: 8
CPU Usage: 25%
Memory Usage: 9.5 GB / 16.0 GB (59%)
Free Disk Space: 166.303 GB
Video Card: NVIDIA GeForce GTX 570
[/code]

If I select the completed DTA job on the monitor and submit a Draft Job manually with the quickdraft option (scripts->processing->draft submission), then it completes the job as expected.

I’ve had a look at custom event plugins, but I seem to be going round in circles with that.

Any pointers on which is the best way to get it working? I feel like I am over complicating this :slight_smile:

Thanks!
drafterrors.JPG

My usual reverse engineering path when modifying submitters is to do this:

Submit a job manually the normal way, submit another job with the settings I want to change, and observe the differences. I’d do the same from the integration script, so set up the Draft script via the submitter. The SMTD is a bit different I think in how it handles Draft and the Monitor script for 3DS Max completely lacks the choice of using Draft, so another app might be helpful.

Just for fun, I got the full list of every extra info key the Draft plugin can make use of. It’s rather staggering:

"DraftAnnotationsFramePaddingSize"
"DraftAnnotationsString"
"DraftCodec"
"DraftColorSpaceIn"
"DraftColorSpaceOut"
"Draft_CreateFTMovie"
"Draft_CreateNimMovie"
"Draft_CreateSGFilmstrip"
"Draft_CreateSGMovie"
"DraftEntity"
"DraftExtension"
"DraftExtraArgs"
"DraftFrameHeight"
"DraftFrameRate"
"DraftFrameWidth"
"DraftNimEncodeSRGB"
"DraftQuality"
"DraftResolution"
"DraftTemplate"
"DraftType"
"DraftUploadToNim"
"DraftUploadToNim"
"DraftUploadToShotgun"
"DraftUploadToShotgun"
"DraftUsername"
"DraftVersion"
"FrameRangeOverride"
"FT_AssetId"
"FT_Description"
"FT_DraftUploadMovie"
"FT_DraftUploadMovie"
"FT_ProjectId"
"FT_TaskId"
"nim_jobID"
"nim_jobName"
"nim_taskID"
"OutputFrameOffset{0}"
"SubmitQuickDraft"
"TaskId"
"VersionId"

I think you can ignore most of these, but they’re good to know about.

If you can’t submit a Draft job from a different application’s integrated submitter, let me know and I can make a job or two for you.

Hi Edwin,

If spent all day comparing plugin config differences, and can’t actually figure out why this is now giving an error.

The Draft event is created when the Tile Assembly job is completed, it picks up the job name/output path etc but just errors out with ‘No Quick Draft type was specified’

The event plugin creates the job_info and plugin_info.job files for the draft job.

The attached shows the submission params, with all the Quickdraft arguments in place (and that is how it looks when manually submitting a Draft job from the monitor or pipeline tools in 3dsmax)

And this is the full job error on the slave that tries to run the job:

[code]=======================================================
Error

Error: Renderer returned non-zero error code, 1. Check the log for more information.
at Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type

RenderPluginException

=======================================================
Stack Trace

at Deadline.Plugins.SandboxedPlugin.a(DeadlineMessage A_0)
at Deadline.Plugins.SandboxedPlugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)

=======================================================
Log

2017-07-11 17:57:08: 0: Loading Job’s Plugin timeout is Disabled
2017-07-11 17:57:10: 0: Executing plugin command of type ‘Sync Files for Job’
2017-07-11 17:57:10: 0: All job files are already synchronized
2017-07-11 17:57:10: 0: Plugin DraftPlugin was already synchronized.
2017-07-11 17:57:10: 0: Done executing plugin command of type ‘Sync Files for Job’
2017-07-11 17:57:10: 0: Executing plugin command of type ‘Initialize Plugin’
2017-07-11 17:57:11: 0: INFO: Executing plugin script ‘C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\plugins\5965020c355e4c0f8c3779a2\DraftPlugin.py’
2017-07-11 17:57:11: 0: INFO: Found Draft python module at: ‘C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft\Draft.pyd’
2017-07-11 17:57:11: 0: INFO: About: Draft Plugin for Deadline
2017-07-11 17:57:11: 0: INFO: Render Job As User disabled, running as current user ‘Jaime’
2017-07-11 17:57:11: 0: INFO: The job’s environment will be merged with the current environment before rendering
2017-07-11 17:57:11: 0: Done executing plugin command of type ‘Initialize Plugin’
2017-07-11 17:57:11: 0: Start Job timeout is disabled.
2017-07-11 17:57:11: 0: Task timeout is disabled.
2017-07-11 17:57:11: 0: Loaded job: TestJ.RGB_color (5965020c355e4c0f8c3779a2)
2017-07-11 17:57:11: 0: Successfully mapped X: to //piknas003/Assets
2017-07-11 17:57:11: 0: Successfully mapped Y: to //piknas003/Resources
2017-07-11 17:57:11: 0: Successfully mapped Z: to //piknas003/Projects
2017-07-11 17:57:12: 0: Executing plugin command of type ‘Start Job’
2017-07-11 17:57:12: 0: Done executing plugin command of type ‘Start Job’
2017-07-11 17:57:12: 0: Plugin rendering frame(s): 0-1
2017-07-11 17:57:12: 0: Executing plugin command of type ‘Render Task’
2017-07-11 17:57:12: 0: INFO: Draft job starting…
2017-07-11 17:57:12: 0: INFO: Stdout Redirection Enabled: True
2017-07-11 17:57:12: 0: INFO: Stdout Handling Enabled: True
2017-07-11 17:57:12: 0: INFO: Popup Handling Enabled: False
2017-07-11 17:57:12: 0: INFO: Using Process Tree: True
2017-07-11 17:57:12: 0: INFO: Hiding DOS Window: True
2017-07-11 17:57:12: 0: INFO: Creating New Console: False
2017-07-11 17:57:12: 0: INFO: Running as user: Jaime
2017-07-11 17:57:12: 0: INFO: Looking for bundled python at: ‘C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe’
2017-07-11 17:57:12: 0: INFO: Executable: “C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe”
2017-07-11 17:57:12: 0: INFO: Argument: -u “\wks15\repo\events\DraftEventPlugin\DraftQuickSubmission\QuickDraft.py” resolution=“1” codec=“jpeg” colorSpaceIn=“Identity” colorSpaceOut=“Identity” DraftExtension=“jpg annotationsImageString=“None” annotationsResWidthString=“None” annotationsResWidthString=“None” annotationsFramePaddingSize=“None” quality=“85” quickType=“createImages” isDistributed=“False” frameList=“0” SubmitQuickDraft=“False” deadlineRepository=”\wks15\repo" taskStartFrame=0 taskEndFrame=1
2017-07-11 17:57:12: 0: INFO: Full Command: “C:\Program Files\Thinkbox\Deadline9\bin\dpython.exe” -u “\wks15\repo\events\DraftEventPlugin\DraftQuickSubmission\QuickDraft.py” resolution=“1” codec=“jpeg” colorSpaceIn=“Identity” colorSpaceOut=“Identity” DraftExtension=“jpg annotationsImageString=“None” annotationsResWidthString=“None” annotationsResWidthString=“None” annotationsFramePaddingSize=“None” quality=“85” quickType=“createImages” isDistributed=“False” frameList=“0” SubmitQuickDraft=“False” deadlineRepository=”\wks15\repo" taskStartFrame=0 taskEndFrame=1
2017-07-11 17:57:12: 0: INFO: Startup Directory: “C:\Users\jaime\AppData\Local\Thinkbox\Deadline9\slave\wks15\Draft”
2017-07-11 17:57:12: 0: INFO: Process Priority: BelowNormal
2017-07-11 17:57:12: 0: INFO: Process Affinity: default
2017-07-11 17:57:12: 0: INFO: Process is now running
2017-07-11 17:57:13: 0: STDOUT: Traceback (most recent call last):
2017-07-11 17:57:13: 0: STDOUT: File “\wks15\repo\events\DraftEventPlugin\DraftQuickSubmission\QuickDraft.py”, line 61, in
2017-07-11 17:57:13: 0: STDOUT: Appending “//wks15/repo/events/DraftEventPlugin/DraftQuickSubmission” to system path to import Quick Draft scripts
2017-07-11 17:57:13: 0: STDOUT: Command line args:
2017-07-11 17:57:13: 0: STDOUT: resolution=1
2017-07-11 17:57:13: 0: STDOUT: codec=jpeg
2017-07-11 17:57:13: 0: STDOUT: colorSpaceIn=Identity
2017-07-11 17:57:13: 0: STDOUT: colorSpaceOut=Identity
2017-07-11 17:57:13: 0: STDOUT: DraftExtension=jpg annotationsImageString=None annotationsResWidthString=None annotationsResWidthString=None annotationsFramePaddingSize=None quality=85 quickType=createImages isDistributed=False frameList=0 SubmitQuickDraft=False deadlineRepository=\wks15\repo taskStartFrame=0 taskEndFrame=1
2017-07-11 17:57:13: 0: STDOUT: raise Exception( “Error: No Quick Draft type was specified.” )
2017-07-11 17:57:13: 0: STDOUT: Exception: Error: No Quick Draft type was specified.
2017-07-11 17:57:13: 0: INFO: Process exit code: 1
2017-07-11 17:57:13: 0: Done executing plugin command of type ‘Render Task’

=======================================================
Details

Date: 07/11/2017 17:57:15
Frames: 0-1
Elapsed Time: 00:00:00:08
Job Submit Date: 07/11/2017 17:51:24
Job User: jaime
Average RAM Usage: 11229392896 (66%)
Peak RAM Usage: 11229392896 (66%)
Average CPU Usage: 22%
Peak CPU Usage: 36%
Used CPU Clocks (x10^6 cycles): 14396
Total CPU Clocks (x10^6 cycles): 65436

=======================================================
Slave Information

Slave Name: WKS15
Version: v9.0.5.0 Release (d7db21feb)
Operating System: Windows 7 Professional (SP1)
Running As Service: No
Machine User: Jaime
IP Address: 10.3.222.15
MAC Address: 00:16:4B:4B:B0:BD
CPU Architecture: x64
CPUs: 8
CPU Usage: 30%
Memory Usage: 10.5 GB / 16.0 GB (65%)
Free Disk Space: 170.430 GB
Video Card: NVIDIA GeForce GTX 570
[/code]

I have attached the event plugin, but it is only doing pretty basic things to create the plugin and Args.

If you can have a look over it and see what’s up, that would be great.

(ps. My life would be a lot easier if the Draft Tile Assembly job could have KVP’s assigned to it in the SMTDSettings maxscript! :slight_smile:)

Thanks.
draftConvert.zip (3.27 KB)

It’s a bit tricky to follow the scripts around at times. In fact, I had to scan the Repo to find where that error is raised, and it looks like it’s in the QuickDraft.py script that gets submitted along. Here are my paths to it for fun:

events/DraftEventPlugin/DraftQuickSubmission/QuickDraft.py:61:        raise Exception( "Error: No Quick Draft type was specified." )
jobs/593ee183652b550d149a6f73/QuickDraft.py:61:        raise Exception( "Error: No Quick Draft type was specified." )

What’s weird is that error should be thrown by the QuickDraft.py template if “quickType” is missing from the arguments, but it’s absolutely being specified. You can see it as “quickType=createImages” in both the “Full Command” and the debug output.

Now, looking at this it seems completely impossible, but it may be something to do with QuickDraft.py that lives in the events folder (see path above). I’m completely stumped at the moment, so if QuickDraft works normally, I’m going to have to confuse a few of the dev team members here. :slight_smile:

Privacy | Site terms | Cookie preferences