Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add custom menu to context menus

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
1000 Views, 2 Replies

Add custom menu to context menus

I know about custom shelves, and custom menu sets, but is there a way to add custom commands to a Maya context menu?

example: I want to put my own custom blendshape scripts in the the create menu on the shape editor.

 

is this something that can be stored in user prefs or is it something I have to custom add with Maya API

2 REPLIES 2
Message 2 of 3
zewt
in reply to: Anonymous

I just started writing an ideas post about this, actually.  (I haven't decided if it's worth posting yet, it doesn't feel like the sort of thing that will get much attention...)  It would also be useful to be able to add to the channel box context menu, and the reference editor context menu when right clicking on a reference.  It doesn't take much to add these, just a strategically-placed callbacks -executeCallbacks call is usually enough.

 

At one point I tried monkey patching this by wrapping Maya's scripts, but functions in MEL aren't first-class variables, so I don't think there's any real way to do that.

 

Some menus do support this, like the "addItemToFileMenu" and "addItemsToRenderLayerEditorPopupMenu" callbacks, but not many.

 

Message 3 of 3
Anonymous
in reply to: zewt

I actually got around this in a sorta hacky custom way, I made a qt widget
that can dock inside a maya window, that I wrote all my functions into and
took over the default maya command to open my new system with my own docked
menu's already inside of it.

still would love a way to do this better, and will continue to look for a
better solution

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report