CGTalk > Software > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 09-08-2013, 11:16 AM   #1
otuama's Avatar
Sean Toomey
Swansea, United Kingdom
Join Date: Apr 2007
Posts: 267
Button Menu

Hi all.

In a menuset, instead of having a button which opens a menu, is it possible to have a button to just run a command?

For example, I have a button next to the help menu. When I press the button it doesn't open a drop down menu but runs a command that opens a GUI.

Old 09-08-2013, 02:02 PM   #2
TD/animator @ Colorbleed
BigRoyNL's Avatar
Roy Nieterau
Technical Director / Animator
Utrecht, NL
Join Date: Feb 2005
Posts: 214
Send a message via MSN to BigRoyNL
Just hook up a command to the postMenuCommand and add no menuItems. The command will be called whenever you click the menu, but nothing gets shown. The command can then of course generate and show the UI.

import maya.cmds as mc def myFunc(*args): print 'Create your GUI here' print 'These are the arguments that Maya passes by default: ', args mc.window( menuBar=True, width=200 ) 'Click me', pmc=myFunc ) mc.showWindow()
Old 09-08-2013, 04:05 PM   #3
otuama's Avatar
Sean Toomey
Swansea, United Kingdom
Join Date: Apr 2007
Posts: 267
Ok, thanks.

What I should have said is that I'd like this in the main maya UI.

So, I presume I need to make a file in the scripts > startup folder. Then, maybe edit the menuSetPrefs.mel file to load in the file.
Old 09-11-2013, 08:39 PM   #4
New Member
yuval gofer
kibbutz hagoshrim 12, IL
Join Date: Mar 2012
Posts: 1

hi all
i'm six years experiance maya and yesturday i've face this wierd errore:// Error: displayString identifier "m_FileMenu.kProjectWindow" does not exist.

in the buttom line maya can't show up the project menu - file - project -set
new etc..
can someone now this ??
need help
Old 09-11-2013, 08:39 PM   #5
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:29 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.