Hey guys, I am just a modeller/animator who is trying to make my work as easily accessible to the other members of my team. So I need a simple (hopefully) tip on how to make all my paths that point to anything.. (i.e. icons, scripts, etc,) relative.. So.. lets say I have a path like this:
-image "C:/Documents and Settings/dougwolf/My Documents/maya/6.5/prefs/icons/TO_OFF.bmp"
And I want change it so that as long as the .bmp image is in the same icon directory on any other persons computer, the script still works. I wanna take out "/dougwolf/" and make it like "/s$/" or something so that maya will just look in the work directory of whatever animator's box it is as long as its in the identical place on their box. Thanks in advance, Doug Wolf
//find out the user icon directory. This will change for every user //You dont have to worry about it unless someone //has non-standard configuration string $myIconDir = internalVar -userBitmapsDir;
//append the file name to the icon folder string $iconPath= $myIconDir + "12.bmp";
//Now simply use the full path where its needed image -image $iconPath;
hey again... I went over it with a friend and we got it, with the much needed help of the previous poster to show us the way.. For anyone else in the similar situation, here is what we ended up with:
global proc shelf_TO_AMANDA () { global string $gBuffStr; global string $gBuffStr0; global string $gBuffStr1; string $myIconDir = internalVar -userBitmapsDir; string $newPath=$myIconDir+"TO_OFF.bmp";