Hey people,
Anyone know how to set relative paths for Maya's Shelf Icons?
I came up with an idea earlier today. After installing Maya 2009 and starting to tailor a new custom shelf I realized how boring all the default MEL command icons area. So to spice up my shelf I said to myself "Every time I add a new shelf command I HAVE to make an icon for it". They do make it look a wee bit better imo.
Aaaaanyway, now I want to move these to another computer. Problem is the icon paths are absolute paths and I do not know how the correct syntax is for setting them as relative.
Right now my Shelf MEL file is in:
\\maya\2009\prefs\shelves\koddeShelf.mel
My icons are in:
\\maya\2009\prefs\icons\koddeShelfIcons\****.bmp
Now if I were to move the whole "koddeShelfIcons" folder to the \shelves\ folder instead, making it a subfolder in relation to the "koddeShelf.mel" I should be able to utilize relative paths? Making it possible to easily copy-paste this shelf with icons to another computer?
Am I thinking correctly here? How is this done?
Thanks!
Replies
Since Maya has a default search path for icon images, which is oddly enough your documents folder \maya\2009\prefs\icons\
Any paths you pass it which aren't absolute will be checked in that folder first, and if it can't find them it'll fall back to any other default folders, before failing.
Nice icons btw, I did something similar with my shelves, except my icons are fugly
Now why does Maya store an absolute path when I was a good boy to place them nestled under the \icons\ folder to begin with. It's like they designed it to screw with you.
Thanks. Well it does make working Maya a bit less of a grey experience
I don't know why, but I have a fondness for the green, grey, red, blue color scheme maya uses and made some of mine to match that.
How do you figure? Do you know my habits of using these?
I generally don't use that many hotkeys in Maya, don't really know why. The shelves was always my favorite way of accessing commands. Don't really like the hotbox either.
Because judging by my initial post I'm not that into editing variables and such in Maya.... yet. This seems very interesting though, especially for distributing stuff though a common server. Thanks for the url.
like: where Kodde is a folder in the Maya folder where you will put yer collections.
( back slash/forward slash inverted cuz code tags strips dem out ).
then in subsequent variables jes begin formatted thusly:
create yer personal directories ( scripts, icons ) in this kodde folder and point the Maya variables to them. icons fer instance:
if yer not comfortable with editing the maya env text file you can
create and edit an XBMLANGPATH from yer system control panel.
system > advanced system settings > click environment variables button
if XBMLANGPATH doesn't already exist click "new" and add it. Then add yer directories.
( seperate any multiple directories with a semi colon. no spaces )
If it already exists click edit and then jes add yer directories
( seperate any multiple directories with a semi colon. no spaces )
I got the example working that you posted, added the MAYA_SHELF_PATH as well to point the env file to both a shelf & icon path.
Thanks claydough, definitely going to play around with this more.
Do I add another MAYA_SHELF_PATH1, MAYA_SHELF_PATH2, etc? Or do I add more locations in the MAYA_SHELF_PATH somehow?
Thanks
So this is what my Maya.env looks like
and this is how I've written my module file path. Also the userSetup is placed inside this script folder of mine as shown with the blue guides .