Nuke Scripts

Well his a script i made and am using in production.
This basically helps you define your new project according to your needs ie set up the folder structure ..
so u dont have to manually create them this dialog box takes care of that...

def ProjectSet():

myPanel = nuke.Panel("SET PROJECT DIRECTORY")
myPanel.addSingleLineInput("SYSTEM ","Z")
myPanel.addSingleLineInput("PROJECT: ","")

myPanel.addSingleLineInput("SEQUENCE: ","")
myPanel.addSingleLineInput("SHOT: ", "")
myPanel.addNotepad("Note","z is the default directory.")




if myPanel.show()==1:


curShow=myPanel.value("PROJECT: ")
curSeq=myPanel.value("SEQUENCE: ")
curShot=myPanel.value("SHOT: ")
curSys=myPanel.value("SYSTEM: ")
myLabel=curShow + "-" + curSeq + "-" + curShot
myPath="z:/" + curShow + "/" + curSeq + "/" + curShot + "/"
dir=os.path.dirname(myPath)
askDir=nuke.ask('create Directory/n%s')
if askDir==1:
os.makedirs(dir)
else:
raise Exception('directory not created')

nuke.addFavoriteDir(myLabel,dir,nuke.SCRIPT | nuke.IMAGE)
nuke.scriptSave()
else:
raise Exception('PROJECT DIRECTORY NOT SET')


nuke.menu("Nuke").addCommand("Set Project","ProjectSet()")


You very well edit and modify it as per your production needs..

1 comments:

Colorist said...

will be uplaoding the next script where in you have a similar dialog box(panel)where you can directly enter your nuke path ie the previously defined folder strcture and it will open the nuke file in it...

Post a Comment