Thread: Cross platform file path problem.. PCs & Mac

Reply to Thread
Results 1 to 2 of 2
  1. #1 Cross platform file path problem.. PCs & Mac 
    Join Date
    Mar 2011
    Posts
    5
    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
    Reply With Quote  

  2. #2  
    Join Date
    Jan 2009
    Posts
    630
    Hey nicvfx,

    You should look into using environment variables, it's a much easier way of solving your problem.

    Have a read up on them in the Environment Variables section of the Nuke User Guide.

    There's also a bit more info here:

    http://www.vfxtalk.com/forum/set-env...598&highlight=[getenv
    Sometimes you're just looking at the wrong side of the table
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. init.py PC file path problem
    By zoostory in forum NUKE from The Foundry
    Replies: 13
    Last Post: November 2nd, 2011, 03:15 AM
  2. depth blur problem (maya iff file)
    By PtB in forum Digital Fusion / DFX+
    Replies: 1
    Last Post: October 24th, 2010, 07:57 PM
  3. Autodesk Expands Options for Mac Users
    By Raz PR in forum Your News
    Replies: 0
    Last Post: September 25th, 2009, 11:29 AM
  4. Printing the complete directory path in the write file?
    By fxguy in forum NUKE from The Foundry
    Replies: 3
    Last Post: May 13th, 2009, 12:50 AM
  5. check file path
    By protean in forum Fusion Scripts & Plugins
    Replies: 0
    Last Post: July 17th, 2008, 02:57 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts