Cross platform file path problem.. PCs & Mac

Hi,

I don’t normally delve into the world of networks but in the place I am at I’ve been asked to set nuke up so that you could say open a script on the PC and on the Mac and both files would point to the same directory and show up in the nuke script without having to relink any nodes.

….ok so I’ve come halfway, I can open scripts I’ve saved on the mac onto the PC and they link up fine… on the other hand when I open up a nuke script on the mac it can’t find PC link and I have to end up relinking all the files. I’ve followed the nuke documents closely so I am wondering if there could be something missing *scratches head*…

This is what I have in my init.py:

import platform
def filenameFix(filename):
if platform.system() in ("Windows", "Microsoft"):
return filename.replace( "/Volumes/Aurora20TB/Projects/", "z:/" )
else:
return filename.replace( "z:/", "/Volumes/Aurora20TB/Projects/" )
return filename

Any help would be appreciated!

Thanks!
-Nic 🙂

No Responses to “Cross platform file path problem.. PCs & Mac”

Post a Comment