Toolkit Fails to Start When I Set the NUKE_PATH Environment Variable

The Launch app sets the NUKE_PATH environment variable prior to the before_launch_app hook is executed in order to point Nuke to the Toolkit bootstrap code. So if you're setting this environment variable using something like os.environ['NUKE_PATH'] = "/my/custom/path", then the Toolkit won't ever be started.

Use this function in tank.util which will append or prepend your path to the NUKE_PATH environment variable while preserving the path to the Toolkit bootstrap:

tank.util.append_path_to_env_var("NUKE_PATH", "/my/custom/path")

Alternately, you can preprend your path using prepend_path_to_env_var()

 

Follow

1 Comments

  • 0
    Avatar
    Ricardo Musch

    So is there any example on how to make a simple hook for this as I can't get this to work.

    Some of these things are very easy to configure in a pipeline without shotgun but when you introduce shotgun it suddenly requires a bit too much coding to get the basics to work.

Please sign in to leave a comment.