Use nuke.root()['views'].fromScript(). To get the default stereo view/color 
settings, you would use (separated for clarity):

views = ('left #ff0000', 'right #00ff00')
nuke.root()['views'].fromScript('\n'.join(views))

Just use as many custom name/color strings as you want.

-Nathan



From: coreydrake 
Sent: Monday, October 24, 2011 10:52 AM
To: [email protected] 
Subject: [Nuke-python] Setting stereo views within a callback

I have a callback for a knobChanged and I need to set stereo views. I've found 
posts where people have had problems with .execute within a call back. The term 
'threading' comes up a lot but currently it is over my head. I'm trying to use:
nuke.root().knob('setlr').execute()
I get the error message 'I'm already executing something else'
I've considered simply manual setting the stereo views with addView() but 
unfortunately I have not found out how to change the view's label color. 

So my question is either of these:
How can I set up stereo views from a callback?
How can I manually set up stereo views but also have control over the color of 
the view label?

I'd appreciate any help with this, thank you.


--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to