This script does not work, but i need to do pretty much exactly what it promises:
thinkboxsoftware.com/deadlin … ptingjobs/
Could you guys post a working example? In particular, im looking for something to get the: GetStartFrame(),GetEndFrame() values
(The documentation does not list the SlaveUtils.GetCurrentJobValue function btw)
Here is the same example, modified to work:
import re
from System.IO import *
from Deadline.Scripting import *
def __main__( *args ):
deadlinePlugin = args[0]
outputDirectories = SlaveUtils.GetCurrentJobValue( "OutputDirectories" )
outputFilenames = SlaveUtils.GetCurrentJobValue( "OutputFileNames" )
paddingRegex = re.compile("[^\\?#]*([\\?#]+).*")
for i in range( 0, len(outputDirectories) ):
outputDirectory = outputDirectories[i]
outputFilename = outputFilenames[i]
for frameNum in range(deadlinePlugin.GetStartFrame(),deadlinePlugin.GetEndFrame()+1):
outputPath = Path.Combine(outputDirectory,outputFilename).replace("//","/")
m = re.match(paddingRegex,outputPath)
if( m != None):
padding = m.group(1)
frame = StringUtils.ToZeroPaddedString(frameNum,len(padding),False)
outputPath = outputPath.replace( padding, frame )
deadlinePlugin.LogInfo( "Output file: " + outputPath )
Notable changes:
*Added *args to the main function call
*gets deadlinePlugin from the argument list and uses it for LogInfo and GetStartFrame / GetEndFrame calls
Thanks Laszlo! We missed that page when updating the documentation for Deadline 6. We’ve made a note to fix this in the 6.1 docs.
Cheers,