Yes, init.py and menu.py files are Nuke’s entry points for Python code that 
needs to be executed at startup. An init.py is always executed (when on the 
NUKE_PATH, obviously), while a menu.py is only executed when Nuke is started in 
GUI mode.

What people tend to do when distributing plugins is to include their own 
menu.py whose contents can be merged into a site or user’s files if they want.

-Nathan



From: Tim Crowson 
Sent: Thursday, April 18, 2013 9:27 AM
To: nuke-python@support.thefoundry.co.uk 
Subject: [Nuke-python] Append to menu at startup: is menu.py the only option?

New guy alert!  

Is the menu.py file the only way to append custom commands to Nuke's menus at 
startup? I'm working on a plugin for exporting and importing custom cameras and 
nulls, and I was hoping to include the menu registration code with the .py file 
that contains my custom commands. So far the only way I can find is to actually 
edit the menu.py file. Is editing the menu.py file the only way to implement 
custom menu entries at startup?

Thanks, and sorry if this a very basic question.

-Tim



--------------------------------------------------------------------------------

High Nerd, of the Order of Nerds, at Magnetic Dreams


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

Reply via email to