Toolkit Development - Best Practices

There are multiple best practices we recommend when dealing with Toolkit code.


We recommend that you copy a hook from the pipeline configuration (usually in it's install/apps folder) to config/hooks and update your environment under config/env to reference these new hooks. When editing hooks it’s good to have a backup to revert to if necessary.


We also recommend managing the pipeline configuration's config folder in Git and having a Git based workflow. Therefore, your hooks will be managed in Git too. This centralized copy of the configuration will then be reusable whenever you configure a new project.

For example, in the Shotgun Desktop, you would simply point the Project Setup Wizard to the Git repository and Toolkit would clone that repository into the new pipeline configuration's config folder. Since the config folder is now a cloned Git repository, it means you can also push to and pull from your centralized configuration, making it easier to update or roll back your pipeline's configuration.


There might be times when hooks are not enough to get the behavior you want out of Toolkit and you will need to tweak an app's code. We recommend you fork our apps on GitHub.

As a Shotgun user, you are completely free to fork the apps and keep the changes to yourself in a private repository. We would also love it if you share the changes with us so the community can benefit from your hard work, and in doing so you don’t have to maintain your own private fork of the app as we make updates.

When submitting back changes, please keep in mind that these tools have to work for a wide audience, so changes that would be specific to your studio will need to be make more generic (which we are happy to provide suggestions around). The best way to propose changes in an app is to introduce a new hook where your studio can implement its own custom functionality while existing users can keep the original intact in the default hook.

Finally, when you're writing your own app or tweaking an existing one, we strongly recommend you use the dev descriptor. It allows you to load an app from anywhere on your file system and exposes the Reload and Restart entry in the Shotgun menu to iterate faster without having to quit Maya or Nuke to reload your code.