Detects the OS and switches the path accordingly
PathSwitcher
Updated: 19 September 2014
Author: Bogor
Compatible Nuke versions: 7.0 or later
Compatibility: Mac, Windows
Just Copy & Paste into yout init.py and make sure you enter your paths.
def filenameFix(filename, toOS = ''):
if (os.name == 'nt') or (toOS == 'nt'):
filename = filename.replace( 'VOLUMES/REPLACE_WITH_MACPATH', 'Z:/REPLACE_WITH_WINPATH' )
return filename
if (os.name == 'posix') or (toOS == 'posix'):
filename = filename.replace( 'Z:/REPLACE_WITH_WINPATH', 'VOLUMES/REPLACE_WITH_MACPATH' )
return filename
return filename