Can't you just check if nuke.root().name() != "Root"?

On 13/02/12 22:12, Colin Alway wrote:
> hi,
> 
> does anyone know if this is 'safe', or if there's a better way to do it?
> 
> i want to execute some code in my menu.py depending on whether nuke has
> been started up 'clean' or with a nuke script to load.
> i found nuke.rawArgs is a list of the command-line args, so i have
> something like this:
> 
> for item in nuke.rawArgs:
>   if item.endswith('.nk'):
>     print 'script on command-line found'
> 
> but is there a better way?
> 
> thanks
> colin
> -- 
> colin alway
> 
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

-- 
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
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