PDA

View Full Version : Hide right click shelf button options


asah
12-07-2012, 11:19 AM
Hello

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

asah
12-07-2012, 12:24 PM
Plzzzzzzzzz help me asap

DeadlyNightshade
12-07-2012, 02: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):
whatIs shelfButtonPMO

...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;

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

asah
12-10-2012, 04:35 PM
Thanks alot :)

CGTalk Moderation
12-10-2012, 04: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.