By the way nothing to do with maya version per see.
QUOTE(andy_davis @ 05/29/09, 01:06 PM) [snapback]308496[/snapback]
Hence me thinking that if I did a source operation on the menu script from the userSetup.mel file, I'd get my custom menu.
It does not appear to be as simple as that though!
Why would on earth you source anything here? If you source and somebode reevals usersetup then yoru code gets rescourced. But if you call jsut the scripts in point it will not get reevaluated saving maya heaps of time.
So make your code PROPER mel
put it in file named foobar.mel
where there is a function:
global proc ydadayada foobar( ydadayada){
}
Maya then autosources your stuff.
theres a second caveat.
Your function must be PROPER maya code. that is you may not rely on functions that come form other parts of maya unless you know for a fact that the maya start up environment allways does something else first so be sure yoru code does not crash (basically you cant count on this!). The fact that it works inside the script editor does not guarantee anything. As code in file has a wildly different scope.
eval deffered is used because you want to be sure maya has built the thing you try to add something to. I mean the menubar may not exist yet.
So if your code has even single function thats not strictly documented in the command reference, and you havent defined it yourself, then you shoudl open it up to plain commands.
Theres 3rd caveat
Nothing says maya reads the My Documents\maya\2009\prefs\scripts theres plenty fo chance to rearrange what maya calls. maya calls the userSetup.mel wich is in folder that's appended last into the environment (top of stack). So please review your code environment and see theres not in fact 2 userSetup.mel files.