Setting the icon path post Maya launch

Hey guys,

Was wondering anyone knows how to set the Maya “XBMLANGPATH” path after launch and have it recognize all the .bmp files in those folders.

I can get it to recognize the path change using the python os module or the mel putenv commands, but it doesn’t seem to really take. While it outputs correctly with the getenv, I still get a file not found error when I open a UI with a call to the bmp files.

What I am basically doing is dynamically building a shelf based off of the existence of folders being created by various artists. If any folders within a certain path exists, it will append all those folders to the XBMLANGPATH variable and then load up the bmps from them. But I don’t want to have to set these paths before maya loads (want to be able to refresh on the fly when folders changes).

This is using Maya 2008 Ext 2.

Thanks!