CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 12-07-2012, 11:19 AM   #1
asah
Veteran
portfolio
asah
Jeddah, Saudi Arabia
 
Join Date: Jul 2012
Posts: 70
Hide right click shelf button options

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
 
Old 12-07-2012, 12:24 PM   #2
asah
Veteran
portfolio
asah
Jeddah, Saudi Arabia
 
Join Date: Jul 2012
Posts: 70
Plzzzzzzzzz help me asap
 
Old 12-07-2012, 02:25 PM   #3
DeadlyNightshade
Plz...
 
DeadlyNightshade's Avatar
portfolio
Martin Dahlin
Jr. Technical Artist
King
Stockholm, Sweden
 
Join Date: Jul 2012
Posts: 899
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|S helfLayout|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
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 12-10-2012, 04:35 PM   #4
asah
Veteran
portfolio
asah
Jeddah, Saudi Arabia
 
Join Date: Jul 2012
Posts: 70
Thanks alot
 
Old 12-10-2012, 04:35 PM   #5
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,480
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 03:39 PM.


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