Feature Request: Nuke Scripts from Region Renders

It would be nice if you could generate a nuke script from region renders instead of actually stitching them.

Hello Gavin,

I will definitely pass this request on to the devs.

Cheers,

Hello Gavin,

We’ve designed the region renders so that they are assembled by Draft, so I’m not sure we want to extend it to assemble it in other ways. This also sounds very pipeline specific, which are things we tend to avoid. Now, there could always be an option for custom development with our Professional Services, if you wanted to investigate that path.

Cheers,

Done.

[code]import os, sys
import clr
import random

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from System.Diagnostics import *
from System.IO import *

from Deadline.Scripting import *
from Deadline.Jobs import *

from DeadlineUI.Controls.Scripting.DeadlineScriptDialog import DeadlineScriptDialog

def main():
scriptDialog = DeadlineScriptDialog()
scriptDialog.SetIcon( Path.Combine( RepositoryUtils.GetRootDirectory(), “plugins/TileAssembler/TileAssembler.ico” ) )

selectedJobs = MonitorUtils.GetSelectedJobs()
nukeScript = "add_layer {TileAlpha TileAlpha.alpha}\n"
for job in selectedJobs:
	inputImage = job.GetJobPluginInfoKeyValue( "RenderOutput" )
	inputImage = RepositoryUtils.CheckPathMapping( inputImage, False )
	inputImage = PathUtils.ToPlatformIndependentPath( inputImage )
	inputImage = os.path.splitext(inputImage)[0] + "####" + os.path.splitext(inputImage)[1]
	inputImage = inputImage.replace('\\','/')
	
	nukeScript += "Read {\n"
	nukeScript += ("file \""+ inputImage + "\"\n")
	nukeScript += "}\n"


	nukeScript += "Shuffle {\n"
	nukeScript += " red white\n"
	nukeScript += " out TileAlpha\n"
	nukeScript += "}\n"

	nukeScript += "Transform {\n"
	nukeScript += "center {{0} {0}}\n"
	nukeScript += "translate {{"
	nukeScript += job.GetJobPluginInfoKeyValue( "RegionLeft" ).split(",")[0]
	nukeScript += "} {root.format.height-"
	nukeScript += job.GetJobPluginInfoKeyValue( "RegionBottom" ).split(",")[0]
	nukeScript += "}}\n"
	nukeScript += "}\n"

	randString = str(random.random())[2:10]
	nukeScript += "set N"+ randString +" [stack 0]\n"
	nukeScript += "push $N"+ randString +"\n"
	nukeScript += "Constant {\n"
	nukeScript += "}\n"
	nukeScript += "Keymix {\n"
	nukeScript += " inputs 3\n"
	nukeScript += " maskChannel TileAlpha.alpha\n"
	nukeScript += "}\n"


QApplication.clipboard().setText(nukeScript)

#f = open("G:\\log.txt", 'r+')
#f.write(nukeScript)
#f.close()

[/code]

Hey,

Thanks for posting that! I am sure there will be some who will make use of it.