0
votes

I am trying to edit the right click context sensitive menu from Maya. I have found how to add a menuItem but I would like to have this Item in the top of the list not at the bottom... I think in this case I need to deleteAllItems from the menu, add mine and then re-add the default Maya ones but I don't know how to re-add them. Where can I find it ? Most of the topics say "modify Maya's source code" but that's not even an option.

Any suggestions ?

Thx !

1

1 Answers

0
votes

Okay i think I have found a solution, that's the best I have found but this is not very handy...

create a copy of the buildobjectMenuItemsNow.mel and dagMenuProc.mel in your script folder so Maya will read those ones instead of the native ones. Once you have done that you can modify the dagMenuProc.mel without destructing anything as you re working on a copy. the proc that needs modifications is the last one : dagMenuProc (line 2240)

and you can start modifying inside the loop (line 2266)

What I have done is make a call to a Python file that adds some more items in the menu and you can obviously remove some items by deleting few MEL lines.

I hope this can help someone. And if there is an other way of doing that, I would love to hear about !