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

Source Code for Module nukescripts.bookmarks

 1  ##### 
 2  ## 
 3  ##  Bookmarks 
 4  # 
 5   
 6   
 7  import nuke 
 8   
 9  quickSaves = {} 
10   
11 -def jumpTo( nodeName ):
12 node = nuke.toNode( nodeName ) 13 for s in nuke.selectedNodes(): 14 s['selected'].setValue( False ) 15 16 node['selected'].setValue( True ) 17 nuke.zoomToFitSelected()
18
19 -def quickSave( slot ):
20 z = nuke.zoom() 21 x = nuke.center()[0] 22 y = nuke.center()[1] 23 quickSaves[slot] = [z,x,y]
24 25
26 -def quickRestore( slot ):
27 try: 28 nuke.zoom( quickSaves[slot][0], [ quickSaves[slot][1], quickSaves[slot][2] ] ) 29 except: 30 return
31