PDA

View Full Version : Cross-platform texture paths


shine77
04-20-2005, 11:01 AM
Is it possible to make texture paths work beetween windows and Linux on a mapped network drive.

Linux example: \mypath\textures\texture.tif
Is it possible to have maybe windows enviroment varible change the path to
Win example: z:\mypath\textures\texture.tif

thanx

cryolab
04-20-2005, 12:42 PM
1. i would go the simpelst way and put the textures in the default dirs ../images; ../sourceimages
2. maybe another way is to use UNC Paths but i didnt test if this work
3. do it with a script that search and repleace at startup of the scene the texturepath "prefix" X:/ to //X or visa versa

shine77
04-20-2005, 02:10 PM
thanx for the repli ill test that

ephemeros
04-23-2005, 12:15 AM
you could use the Maya.env file.
eg.: lets say you have a partition z: on windoze mounted in /mnt/win_d in linux, on it is a folder "work" containing the textures in work/textures. edit Maya.env file in a text editor. enter
MY_PATH = /mnt/win_d/work (for linux)
and
MY_PATH = z:\work (for windows)
and save the file.
the Maya.env file is in your home folder /maya eg: c:\Documents And Settings\Me\maya\6.5 - for windoze and /home/me/maya/6.5 - on linux
when you open maya, it considers MY_PATH env variable as the path entered in each OS
so, for a texture located in z:\work\textures\texture.tif (windows) or /mnt/win_d/work/textures/texture.tif write $MY_PATH/textures/texture.tif
when you save the scene, tha path is saved as you wrote it (if path is correct), then you may use the scene both on windows or linux without any changes.
try to avoid spaces in your folders` and files` names
you may declare more envs like:
MY_TEXTURES = $MY_PATH/textures
MY_SCENES = $MY_PATH/scenes (linux)
or
MY_TEXTURES = %MY_PATH%\textures
MY_SCENES = %MY_PATH%\scenes (windoze)
bye

CGTalk Moderation
04-23-2005, 12:15 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.