Package nukescripts :: Module info
[hide private]
[frames] | no frames]

Source Code for Module nukescripts.info

 1  # Copyright (c) 2009 The Foundry Visionmongers Ltd.  All Rights Reserved. 
 2   
 3  import nuke 
 4  import re 
 5  import os.path 
 6   
7 -def getallnodeinfo():
8 this = nuke.toNode("this") 9 knobdata = this.writeKnobs(nuke.TO_SCRIPT) 10 knobdata = re.sub("}", "", knobdata) 11 knobdata = re.sub(" {", "", knobdata) 12 knobdata = re.sub("{", "", knobdata) 13 output = "Node Info for : " + this.fullName() 14 output += "\n" + nuke.showInfo() 15 output += " -- \nKnob Info:" 16 output += "\n\t" + knobdata 17 18 classname = this.Class() 19 if classname == "Read" or classname == "Write": 20 fileknob = this.knob("file").value() 21 proxyknob = this.knob("proxy").value() 22 23 # fileknob and proxyknob can be None object 24 # set to empty string in order to avoid any exception 25 if fileknob == None: 26 fileknob = "" 27 28 if proxyknob == None: 29 proxyknob = "" 30 31 output += "\n\nFile Info:" 32 output += "\n\tFull Res Path : \n\t\t" + fileknob 33 output += "\n\n\tProxy Res Path : \n\t\t" + proxyknob 34 output += "\n --" 35 output += "\n\tFull Res File : \n\t\t" + os.path.basename(fileknob) 36 output += "\n\n\tProxy Res File : \n\t\t" + os.path.basename(proxyknob) 37 38 return output
39
40 -def infoviewer():
41 nuke.display("nukescripts.getallnodeinfo()", nuke.selectedNode())
42