Hi Colin,

I haven't done this myself before but I'd say this is the way to do it.

frank

On 2/14/12 12:42 AM, 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
_______________________________________________
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