Heres another of my small scripts.in continuation of the earlier one i poseted,though havent synced them exactly..but just to get the idea...
This one takes your inputs of your project structure(you must know it,and it must exist) and add a shortcut to it in the file open panel so that you can directly go into it.
(wht still i haven't figured out, how will do this over network cos rite now i want my drive to be mapped on my system to access it,still figuring it out,in this cript i hve presumed my project to be in my local d drive)

def ProjectFile():

myPanel = nuke.Panel("My Project")
myPanel.addSingleLineInput("PROJECT: ","My Project")

myPanel.addSingleLineInput("SEQUENCE: ","01")
myPanel.addSingleLineInput("SHOT: ", "")


if myPanel.show():


curShow=myPanel.value("PROJECT: ")
curSeq=myPanel.value("SEQUENCE: ")
curShot=myPanel.value("SHOT: ")
myLabel=curShow + "-" + curSeq + "-" + curShot
myPath="d:/" + curShow + "/" + curSeq + "/" + curShot + "/"
dir=os.path.dirname(myPath)
if os.path.isdir(dir):
nuke.addFavoriteDir(myLabel,myPath,nuke.SCRIPT | nuke.IMAGE)
nuke.scriptOpen()
else: raise Exception('The File Path Doest Exsits')

0 comments:

Post a Comment