negative frames in Nuke

Hi guys,

Getting something of a bug here when rendering nuke scripts with frame ranges that include negative frames.
I divide up my nuke jobs in tasks of 25 frames. Submission succeeds as expected, but I started getting
write access errors. When looking at the slave logs I saw that multiple slaves were trying to write the same
frames to disk.

Here’s the command line that the one of the slaves gets:
0: INFO: Render Argument: -V -x “C:\Documents and Settings\render\Local Settings\Temp\167_introclip.nk” -74,-50

The other ones get similar commands, but with frames -49,-25 and so on an so forth. All good, I thought.

When I copy-pasted the command (with -74,-50 at the end) to my workstation’s command line, Nuke rendered the entire
comp, starting at frame -74. So this must be the wrong syntax for frame range.

This is the command that actually lets me render part of a negative frame range:
nuke5.2 -F -74–50 -V -x C:\Documents and Settings\render\Local Settings\Temp\167_introclip.nk.

Using the capital F, losing the comma and placing it before the script file name did the trick.

Can I modify the submission tcl script to get it right?

Cheers!
Dennis

Hi Dennis,

I guess you’re still using Deadline 3.x, correct? We changed the way Deadline renders with Nuke 5 and later in Deadline 4.0, and I’ve confirmed that this handles negative frame ranges properly.

That being said, you should be able to modify the Nuke plugin (\your\repository\plugins\Nuke\Nuke.py) to change how the frame range is being passed on to Nuke. First, backup the Nuke.py file. Then, in the Nuke.py file, find the RenderArgument function, which should look something like this:

	## Called by Deadline to get the render arguments.
	def RenderArgument( self ):
		# Enable verbosity and execute the Nuke script (as opposed to editing it)
		renderarguments = "-V -x"
		
		threads = GetIntegerPluginInfoEntryWithDefault( "Threads", 0 )
		if threads > 0:
			LogInfo( "Using " + str(threads) + " threads for rendering" )
			renderarguments += " -m " + str(threads)
		
		ramUse = GetIntegerPluginInfoEntryWithDefault( "RamUse", 0 )
		if ramUse > 0:
			LogInfo( "Limiting RAM usage to " + str(ramUse) + " MB" )
			renderarguments += " -c " + str(ramUse) + "M"

		renderarguments += " \"" + self.TempSceneFilename + "\""
		renderarguments += " " + str(GetStartFrame()) + "," + str(GetEndFrame())

Change the last two lines to look like this:

		renderarguments += " -F " + str(GetStartFrame()) + "-" + str(GetEndFrame())
		renderarguments += " \"" + self.TempSceneFilename + "\""

I think that should do the trick. Save the file and try submitting a new job.

Cheers,

  • Ryan

And another fine fix from Ryan :slight_smile:
Works like a charm

Thanks!