You can create a empty nuke script that is setted up with all project
settings you want
to be has default ( stereo views, view color, etc.. ), and save this empty
script as template.nk and put it in your NUKE_PATH.
Then in menu.py just put this line :

nuke.load ("template.nk")

now each time you create a new nuke script, it will take all setting from
the template, i'm using
it for stereo view and proxy settings, its work fine for me ;)

hope this help you ;)

matthieu.

On Fri, Mar 25, 2011 at 11:58 PM, Erik Winquist <[email protected]>wrote:

>  hi all,
>
> i haven't tried this on OSX, but does this work for anyone under linux w/
> nuke 6.1?  i used to be able to do something similar in nuke 5.1 and that
> actually worked, but no dice with nuke 6.1.
>
> even with removing all custom config stuff from my NUKE_PATH, putting this
> in a fresh init.py file doesn't start up nuke with stereo views defined.  a
> nuke.tprint() call confirms that the init.py is getting sourced on startup.
>
> the only template.py file in the NUKE_PATH is the one which ships with
> nuke, and that file only creates a Viewer node.
>
>
> any ideas?
>
> erik
>
>
>
> Michael M wrote:
>
> In menu.py:
>
> nuke.root()['setlr'].execute()                # slightly more pythonic way
> nuke.root()['views_colours'].setValue(True)
>
> or
>
> nuke.root().knob('setlr').execute()   # more explicit and readable within nuke
> nuke.root().knob('views_colours').setValue(True)
>
> Alternatively, do this in your init.py if you've got users who are
> going to be using nuke -t in scripts to build nuke and render nuke
> scripts 'on-the-fly' and they need to properly handle views.
>
> Michael
>
>
> On Mon, Aug 16, 2010 at 10:36 PM, Nickolas Stevens <[email protected]> 
> <[email protected]> wrote:
>
>
>  I am trying to figure out how to set up stereo views on Nuke startup through 
> menu.py
>
> I can set up stereo views through the addView command, however I haven't been 
> able to get it to run correctly through menu.py Are there any good 
> alternative ways to set this up?  I haven't been able to find a way to access 
> the setlr command, can I access the setlr command?
>
> Thanks,
> Nick _______________________________________________
> Nuke-python mailing 
> [email protected]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>      _______________________________________________
> Nuke-python mailing 
> [email protected]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
> --
> erik winquist
> weta digital
>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to