Facility wide file name replace

I’m trying to set up a server side init.py file so all of our Nuke users can run scripts and find footage without it breaking on other systems. Were using all 3 operating systems.

I have no idea how to create the script but I have a feeling its something similar to this:

Code:

if nuke.env[WIN32] or nuke.env[WIN64]
        then replace /mnt/volumes/xsan/
                with //192.168.1.242/Xsan/
        else replace /Volumes/Xsan/
                with //192.168.1.242/Xsan/

if nuke.env[OSX]
        then replace //192.168.1.242/Xsan/
                with /Volumes/Xsan/
        else replace /mnt/volumes/xsan/
                with /Volumes/Xsan/

if nuke.env[LINUX]
        then replace //192.168.1.242/Xsan/
                with /mnt/volumes/xsan/
        else replace /Volumes/Xsan/
                with /mnt/volumes/xsan/


If anyone has some guidance it would be much appreciated.

No Responses to “Facility wide file name replace”

Post a Comment