Source code for nukescripts.stereo
# Copyright (c) 2010 The Foundry Visionmongers Ltd. All Rights Reserved.
import nuke_internal as nuke
[docs]def setViewsForStereo():
nuke.root().knob('views').fromScript( '\n'.join( ('left #ff0000', 'right #00ff00') ) )
[docs]def setViewsForStereoOrMono():
""" If there is only one view, set stereo, otherwise set to a single main view. """
numViews = len(nuke.views())
if numViews == 1:
setViewsForStereo()
else:
setViewsForMono()