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

Source Code for Module nukescripts.stereo

 1  # Copyright (c) 2010 The Foundry Visionmongers Ltd.  All Rights Reserved. 
 2   
 3  import nuke 
 4   
5 -def setViewsForStereo():
6 nuke.root().knob('views').fromScript( '\n'.join( ('left #ff0000', 'right #00ff00') ) )
7
8 -def setViewsForMono():
9 nuke.root().knob('views').fromScript('main #ffffff')
10
11 -def setViewsForStereoOrMono():
12 """ If there is only one view, set stereo, otherwise set to a single main view. """ 13 numViews = len(nuke.views()) 14 if numViews == 1: 15 setViewsForStereo() 16 else: 17 setViewsForMono()
18