Selec eye to render Nuke submission

Hi !

I wounder if if would be possible to implant in the nuke submitter with eye we want to render. Because it’s into the same write node. Could be nice to have a roll out menu letting us select left right or both,

Thanks !

Fred

I’m not a Nuke expert, but if this is something you can do through Python, then you could edit the integrated Nuke submitter in \your\repository\submission\Nuke to try and support this.

Does Nuke have something like this built in already? For example, what would you currently do if you just wanted to do a local render to render only the Left eye?

Cheers,

  • Ryan

Hi, I did this, I modified the submitter and sent the view information through plugin info file, and then modified the nuke plugin.py, to give this to deadline cmd with the -view flag (standard nuke flag). If you want I can help but since our nuke submitter and plugin file is very much hacked, I can’t just simply zip and post it, I have to look into the details. I need some time to do this, but I will, if you still need this…?
Cheers
Gabor

Hey Gabor,

That’s cool! Any code you could post would definitely be appreciated. It’s unlikely we’ll have time to implement this for 5.2, but having some code to refer to will definitely speed up the process when we get around to it. :slight_smile:

Cheers,

  • Ryan

Hi, here it is, ugly code, and probably not the best procedure, but seems to work. :
(Beware of tabs)

Submission/SubmitNukeToDeadline.py, gui declaration in init somewhere append this:

		self.viewToRenderLabel = nuke.Text_Knob( "separator31", "Views to render:" )
		self.addKnob( self.viewToRenderLabel)
		
		self.views = nuke.views()
		self.viewToRenderKnobs = []
		for x, v in enumerate(self.views):
			bknob = nuke.Boolean_Knob(('viewToRender_%d' % x), v)
			bknob.setFlag(0x1000)
			self.viewToRenderKnobs.append((bknob, v))
			self.addKnob(bknob)
			bknob.setValue(True)

Still SubmitNukeToDeadline.py, in SubmitJob function, where writing into plugin info file, for example after: “fileHandle.write( “NukeX=%s\n” % dialog.useNukeX.value() )”

	viewsToRender = getSelectedViews()
	viewsToRender_str = ','.join(viewsToRender)

	print 'Views to render in plugin info file: %s' % viewsToRender_str 
	fileHandle.write( "viewsToRender=%s\n" % viewsToRender_str )

Still SubmitNukeToDeadline.py, at the end, a new function to get list of views from submitter dialog (that the user selected) write this:

def getSelectedViews():
	global dialog
	x = 0
	viewsToRender = []
	for vk in dialog.viewToRenderKnobs:
		if vk[0].value():
			viewsToRender.append(vk[1])		
		x+=1
	print '\nViews to render: %s\n\n\n ' % viewsToRender
	return viewsToRender

In plugins/ nuke.py file in RenderArgument function, just before return append this:

viewsToRender = GetPluginInfoEntryWithDefault( "viewsToRender", "" )
if viewsToRender != '':
	LogInfo( "==VIEWS==\nUsing " + viewsToRender + " view(s) for rendering\n" )
	renderarguments += " -view \"" + viewsToRender + "\""			

Sorry for any mistakes I made or if I left out something.

Hope this helps,
Gabor