View Full Version : Hide right click shelf button options
Please how hide right click shelf button options (mi) like open,edit and delete option that appear when right click in shelf button?
and also how hide options(Shelf Tabs,Shelf Editor,New Shelf,Delete Shelf, Load Shelf,Save all shelves) that is appear when click on shelf?
Please help me
12-07-2012, 01:25 PM
If you open the script editor and enable all echoing, then right click a shelf button you will see this:
shelfButtonPMO "MayaWindow|toolBar2|MainShelfLayout|formLayout14|ShelfLayout|Custom||popupMenu42" 1 "shelfButton17" "/*dSBRMBMI*/";
The first one is a command or procedure call - the others after that is just the UI-hierarchy
Then type the following line in the script editor (VERY useful):
...that does a query on a command or procedure call, and Maya will tell you what it is or what it comes from:
// Result: Mel procedure found in: C:/Program Files (x86)/Autodesk/Maya2012/scripts/others/shelfButtonPMO.mel //
shelfButtonPMO.mel also has a *.res -file with names for the UI-stuff. So open the res-file:
Here I look for the "title" names of whatever UI element I want to look up. Say you want to remove the delete -option in the list, so do a search for "Delete":
displayString -replace -value "Delete" m_shelfButtonPMO.kDeleteMenuItem;
...that is the interesting part. Copy that, and search for that string in the shelfButtonPMO.mel file
Now this file was rather small, so a search like this wasn't really needed. But I showed you this so that you can lookup stuff on your own in the future (Give a man a fish, and he has food for a day. Teach a man how to fish, and he has food for a lifetime)
So yea... if you mod the shelfButtonPMO.mel you can probably get rid of them
12-10-2012, 03:35 PM
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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.