I found a func in submitnuketodeadline.tcl as
Checks if the given filename ends with a movie extension
proc IsMovie { path } {
set ext [file extension $path]
if {[string compare -nocase $ext “.mov”] == 0} {
return true
}
return false
}
Gets the chunk size that is required if submitting a movie job.
proc GetChunkSize { defaultValue } {
set theNodes [nodes]
foreach node $theNodes {
if {[class $node] == “Write” && [knob $node.disable] != true } {
if {[IsMovie [filename $node]]} {
return 1000000
}
}
}
return $defaultValue
}
the code seems putting mov chunksize to 1000000 while checking it as the write node is for mov… its awesome it does my job on the deadline farm how can I get this same functionality in python script?
If you have Deadline 4.1 SP1 installed, there was a python version of the script that was shipped with it. There were some bugs though, but a patch can be found here:
viewtopic.php?f=57&t=4394
The code to check if the path is a movie file can be found in the SubmitNukeToDeadline.py script:
# Checks if the given filename ends with a movie extension
def IsMovie( path ):
lowerPath = path.lower()
if lowerPath.endswith( ".mov" ):
return True
return False
The code that uses this to set the chunk size can be found further down the file:
tempJobName = dialog.jobName.value()
tempChunkSize = dialog.chunkSize.value()
if dialog.separateJobs.value():
tempJobName = tempJobName + " - " + node.name()
if IsMovie( node.knob( 'file' ).value() ):
tempChunkSize = 1000000
else:
for tempNode in writeNodes:
if not tempNode.knob( 'disable' ).value():
if IsMovie( tempNode.knob( 'file' ).value() ):
tempChunkSize = 1000000
break
Hope that helps!
but how to get the quicktime to be submitted based on dependency like first all the dpx and tga blah blah renders but how to submit quicktime after the dpx renders are finished?
It would be similar to my suggestion here:
viewtopic.php?f=11&t=4926&p=20074#p19986
It will take some custom scripting on your part to get the dependencies hooked up. The script would have to go through all the write nodes and figure out which ones write out sequences and which ones write out movies. It would submit the sequence write nodes first and gather their job ids from the submission results. Then when it submits the movie write nodes, it will use the job ids from the earlier jobs to set up dependencies.
The python script I referred to already has code to submit each write node as a separate job, so that should be a good starting point. If you have specific questions along the way, we’re here to help!
Cheers,
we have a different requirement I just want the script in such a way where apart from mov write nodes everything can go in one script and the mov should be taking the dependency on the first job.
Reason why: all the other passes can be rendered once like exr, tga alpha or jpeg or whatever in one go and the mov in another go just to save the render time…
example:
1 write node ( 20min to render )
2 write node 2 ( same 20 min to render )
but if the two write nodes are connected at the end the total rendertime for both will be hardly 21 mins hence saving time.
I need that small script which does the job in just one submission and the other mov submission gets triggered over the renderfarm and renders the mov on one machine can you make this as a release next time so that it will be very much helpful to everybody who uses nuke… and ofcourse its a very general problem…
I guess you could write a script that walks through the walks through all the write nodes once and disables the non-movie ones, and then submits one job, and gets that job’s ID from the results. This first job will render all the enabled write nodes (the sequence nodes) in one shot and save render time. For the second job, the script would have to re-enable the movie write nodes and disable the sequence write nodes, and then submit one job that is dependent on the first.
This is because you can’t pick and choose multiple write nodes when rendering with Nuke from the command line. It’s either one write node or all of them. I imagine the script would be pretty painful to write though.
In Deadline 5.0, we’ll be adding the ability to trigger events when a job finishes. So perhaps you could write an event plugin that handles Nuke jobs when they finish rendering by submitting a QT generation job that builds a movie from the rendered images. This takes Nuke out of the equation for movie generation though, so I’m not sure if that will suit your pipeline.
Cheers,
thats great will wait for deadline 5 so that it would be easy to submit the movs after the 2k renders…
in the mean time is there any possibility to use two deadline submit scripts where I can trigger one after other with different presets so that it would be easy to submit one script after other with different settings?
Not out of the box. Again, this would require some custom scripting on your part. Under the hood, a job submission just involves creating a few text files and submitting them (along with any other job related files, like the Nuke comp file). You can refer to the Nuke submission script for reference, and this might be helpful too:
thinkboxsoftware.com/job-sub … o_Deadline
So you could write a custom submitter to do things exactly the way you need it to.
NOTE: We try to make our submitters as flexible as possible, but we can’t support every pipeline out of the box, so I hope you understand that I’m not trying to shove this (or you) under the rug by saying “you can do this yourself”. If a studio’s pipeline requires more customization, our submitters and plugins are all scriptable so that you can either tweak them to suit your needs or write your own from scratch. If you are writing a custom script and get stuck, please feel free to ask us specifics because we’re here to help.
Cheers,