Using to dynamically change a plugin path based on the version of Nuke that is launched

Written by J. John Corbett on .

We purchased a plugin for our Nuke pipeline but it was a different file for Nuke 8 and 9.  Unfortunately, the plugin was named the same for both versions meaning we couldn't just drop two different files in the plugins folder and have it sort out automatically.  Using the environment variable, NUKE_VERSION_STRING, I was able to have Nuke check the version on loading and tell it to go to different folders for the plugin so it always finds the correct one.

In the main Nuke_Plugins folder (where we keep all our gizmos, python scripts, and, I made two folders.  Let's call our new plugin, NewPlugin:




Then I added to the 

nuke.NUKE_VERSION_STRING == '9.0v5':






We have 2519 guests and 46 members online