Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 03-09-2006 , 10:39 PM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095

creating menu

ok, this is a real noob question - and I feel ashamed even asking it -

I´m trying to create a new menu and used the mel command ref but the example given creates only a window. also had a look at some other peoples scripts how they do. and it works. but as soon as I try adding scripts with the flag

-c "script"

next time maya starts up - the menu has gone. in addition my 2 other costum menus from MJpolyTools and advCharTools disappear.



how would a simple script look like to make me a menu with some items (scripts from my scriptsDirectory) in it?


everything starts and ends in the right place at the right time.
# 2 03-09-2006 , 10:57 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Do you mean that the menu is on Maya's Menu bar or in a window? user added image

No idea how to make a menu in Maya's main UI,
But in a Window it's like this:

window -title "Menu Test Window" -menuBar true;

menu -label "File" -tearOff false;

menuItem -label "New" -command "new";
menuItem -label "Save" -command "save";
menuItem -divider true;
menuItem -label "Close" -command "close";

menu -label "Edit" -tearOff true;

menuItem -label "Undo" -command "un";
menuItem -label "Redo" -command "re";
showWindow;

Hope it helps user added image

# 3 03-09-2006 , 11:29 PM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095
no, ah mean yes - I would need it in the main menu bar. your example is what I tried first from the melCommandReference.

the main goal for me is to have different folders with melScripts in the script directory. so I want to have different mainMenus for different needs like modeling or rigging.

but thanx though for spending your time on this.


everything starts and ends in the right place at the right time.
# 4 04-09-2006 , 12:02 AM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095
problem solved. modified a script I already had.


everything starts and ends in the right place at the right time.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads