Thursday, 15 October 2015

Custom icon path in Maya

So after some time I decided to add a custom icon path to Maya. I always used labels and default commandButton.png or pytonFamily.png icons with only adding my custom label.

So I have added a line to my Maya.env file


I found a problem when adding this custom icon. First I used Maya UI interface to change name of the icon (clicking on the Edit button on shelf). I used relative name of course, so just put name of the icon. For example: constraint.png

This didn`t work and Maya didn`t find the icon in the new search list added I think in Maya 2015.

So I closed Maya and edited the actual shelf script file. I changed the name of icon in flags -image and -image1 like this:

-image "myIcon.png"
-image1 "myIcon.png"

Then started Maya again and this time it worked. So here is a tip, if you have custom icon path with your custom icons, after adding the path to your XBMLANGPATH variable, just change your shelf script file in some text editor. Remember, only when Maya is closed, otherwise it would overwrite it since during closing process it stores Shelves (default Preference settings).

Post a Comment