adding placeholder menu BEFORE the file menu

29 views
Skip to first unread message

wfp...@gmail.com

unread,
Sep 18, 2017, 6:09:50 PM9/18/17
to Python Programming for Autodesk Maya
i bought a very wide monitor (samsung chg 90). Everything is absolute fine with it, but because all menus start appear on the most left position the menus are for me too muc on the left side(see attached screenshot). So is there a way to add a "custom menu" (placeholder, with specified width) BERFORE the common FILE MENU so that all menus appear more in the middle of the mainmenubar? Would be a deal if someone could help me - i'm not familar with mel scripting!

sincerly peter

Michael Boon

unread,
Sep 18, 2017, 8:01:25 PM9/18/17
to Python Programming for Autodesk Maya
Maybe someone else can be more useful, but from what I can see this isn't easy. Maya provides commands like menu, and menuSet, that allow you to add and reorder menus, but you can't add menus to the default sets, and you can't have a different menu set show up to the left of the "Common" menu set.

You could do it by editing the file <drive>:\Program Files\Autodesk\Maya<year>\scripts\startup\initMainMenuBar.mel
in about a dozen places.

Much easier is changing the text on the File menu. In
<drive>:\Program Files\Autodesk\Maya<xxxx>\scripts\startup\FileMenu.res.mel, look for
displayString -replace -value "File" m_FileMenu.kFile;
(or the equivalent in your language)
and add a bunch of spaces before File, eg
displayString -replace -value "                               File" m_FileMenu.kFile;

It's a hack, but I don't think it's dangerous at all, just inconvenient. You'll have to restart Maya to see the effect, and you'll have to set it by hand for each version of Maya that you use.

wfp...@gmail.com

unread,
Sep 19, 2017, 4:13:20 AM9/19/17
to Python Programming for Autodesk Maya
IT WORKS - YOU ARE MY LIFESAFER!!!I had to add 470(!!!) spaces till it starts in the center of the monitor!!! Did'nt expect that it works with that many...

THANK YOU VERY MUCH!!!

Sincerly Peter
Reply all
Reply to author
Forward
0 new messages