Hi,
Not sure if this is something I should handle in NAS, OS or application level, but now I have running both macOS and Windows reading files from NAS. So my textures and basically all files are on S:whatever_folder or volume/whatever_folder... depending which machine I am using.
How should I handle this kind of issue? I would hugely appreciate your guidance. Thank you.
Windows and macOS path mismatch
400 4 2- JuhaT
- Member
- 58 posts
- Joined: Aug. 2014
- Offline
- viklc
- Member
- 218 posts
- Joined: May 2017
- Offline
Hi you could try to set up a package [www.sidefx.com] that dynamically handles a global var that relies on the os type.
Something like this (example from docs):
Something like this (example from docs):
{ "hpath" : [ {"houdini_os != 'windows'" : "/user/bob/libs"}, {"houdini_os == 'windows'" : "$HOME/bob_win_libs"}, {"$use_tom_libs == '1'" : "$HOME/tom_libs"} ] }
- graham
- Member
- 1922 posts
- Joined: Nov. 2006
- Online
You could look at using the HOUDINI_PATHMAP variable: https://www.sidefx.com/docs/houdini/ref/env.html [www.sidefx.com]
HOUDINI_PATHMAP
This string defines multiple mappings represented as a Python-style dictionary. These mappings are used when a given opened path fails to find fallbacks.
Mappings can map one directory to another directory. The key is the directory to map and the value represents the destination directory. For example:
{ "c:/temp": "/tmp", "/mnt/render": "//storage/share/render" }
would create two directory mappings.
HOUDINI_PATHMAP
This string defines multiple mappings represented as a Python-style dictionary. These mappings are used when a given opened path fails to find fallbacks.
Mappings can map one directory to another directory. The key is the directory to map and the value represents the destination directory. For example:
{ "c:/temp": "/tmp", "/mnt/render": "//storage/share/render" }
would create two directory mappings.
Graham Thompson, Technical Artist @ Rockstar Games
- Tronotrond
- Member
- 53 posts
- Joined: July 2017
- Offline
We've been ok using both HOUDINI_PATHMAP and variables set up in houdini.env. For work in Solaris and with USD it can get a bit more tricky, but sticking to relative paths wherever you can works as long as everything is contained on one drive. This is from working on Windows and rendering on Linux though.
- JuhaT
- Member
- 58 posts
- Joined: Aug. 2014
- Offline
Sorry, this is so advanced to me.
So should I write HOUDINI_PATHMAP inside houdini.env?
I simply don’t understand what that means.
{ "c:/temp": "/tmp", "/mnt/render": "//storage/share/render" }
Is c:/temp = windows path and
/tmp = macOS path?
If my windows seeing my NAS disk as S:/projects then I should put /volume/projects/ as my macOS path?
Difficult to understand, sorry and thanks for your help.
So should I write HOUDINI_PATHMAP inside houdini.env?
I simply don’t understand what that means.
{ "c:/temp": "/tmp", "/mnt/render": "//storage/share/render" }
Is c:/temp = windows path and
/tmp = macOS path?
If my windows seeing my NAS disk as S:/projects then I should put /volume/projects/ as my macOS path?
Difficult to understand, sorry and thanks for your help.
Edited by JuhaT - Nov. 16, 2024 13:16:35
-
- Quick Links