Trees | Indices | Help |
|
---|
|
1 # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved. 2 3 import nuke 4 57 """Set all selected nodes to be the same colour as the first selected node.""" 8 n = nuke.selectedNode() 9 if n is None: 10 nuke.message("No node selected") 11 return 12 13 c = n.knob("tile_color") 14 c = nuke.getColor(c.value()) 15 n.knob("tile_color").setValue(c) 16 17 # get other nodes: 18 n = nuke.selectedNodes() 19 for i in n: 20 i.knob("tile_color").setValue(c) 21 nuke.modified(True)22 2325 d = nuke.dependentNodes(nuke.EXPRESSIONS | nuke.HIDDEN_INPUTS, nuke.selectedNodes(), False) 26 l = "" 27 for i in d: 28 if i.Class() != "Viewer": 29 l = l + i.fullName() + ", " 30 l = l[0:len(l)-2] 31 if len(l) > 0: 32 if not nuke.ask("The nodes you are deleting are used by expressions in:\n" + l + "\nAre you sure you want to delete?"): 33 return 34 nuke.nodeDelete(popupOnError)35
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Nov 23 08:52:28 2012 | http://epydoc.sourceforge.net |