Nuke Custom Scripts Folder

Keeping custom stuff (scripts/menus/gizmos etc.) outside of an application’s own folder and into a custom folder such as on a server is useful for keeping your things organised, and potentially VERY importaly sharing between more than one user in a work environment.

Also I find it’s useful for backing up, instead of having to go and find lots of different application folders you need to keep, you can keep them all on the server.
I’ll probably use the ‘Workgroup’ quite often as that’s what it’s called in XSI, which is set up really well for this kind of business.

So for Nuke there is a ‘init.py’ file that you can add paths to that nuke will check for scripts.
I’m not going to go into any great detail what it is for, but just what is needed to achieve the point of the post.

In windows, it’s in a folder like this (depending on Nuke version)

Instead of adding to that file, you can create your own blank ‘init.py’ script in your user folder, this is much cleaner and is independent of Nuke versions.
You should create the file in a path similar to this:

Inside the file, all you need to do is add one line, telling Nuke where to pick up the scripts. Be careful to use ‘/’ instead of window’s ‘\’ which causes potential conflicts:

In my Nuke workgroup folder I have a few scripts which I’ll detail in a differnet post.
Namely there is:

  • menu.py – A custom menu in the menu bar.
  • sr_Scripts.py – Contains my custom scripts which the menu references