Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 20-10-2007, 06:22 PM   #1
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Question Apply Maya's Images onto a Shelf Button

I'm creating my custom shelf and I can't find the location of the icons that are already applied on other shelf buttons, such as the up and down arrows on the undo & redo buttons in 'General' shelf.
Also, is there a way to copy (not move) shelf buttons from one shelf to another?

I'm using Maya 8.5.
Benny
BennyK is offline   Reply With Quote
Old 20-10-2007, 07:13 PM   #2
t1ck135
Registered User
 
t1ck135's Avatar
 
Join Date: May 2004
Location: UK
Posts: 1,991
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A couple of options for you:

- To create a new shelf icon image simply do a screengrab of Maya's viewport, cut the relevant bit out (making sure the size is 32x32 pixels). Now modify the icon in something like photoshop and save as a .bmp to a location where you can load it from. I usually put it in:
<drive>:/Program iles/Autodesk/Maya<version>/icons/<myiconfolder>/new_icon.bmp
or:
<drive>:\My Documents\maya\<version>\prefs\icons
but you can put them anywhere really

- To use an existing or newly created shelf icon go to Window -> Settings/Preferences -> Shelf Editor. A window pops up which allows you to choose shelves and shelf contents. Choose the shelf button you want to change the icon to and click the 'change image' button.
Now locate where the icon you want is (if using the first step above) and it will add it in.

- To copy a shelf item, first open up your script editor (Window - > General Editors -> Script Editor) and press the shelf item that you want to copy. You should see a Mel command(s) appear in the script editor. Highlight that code and middle mouse button drag it to your shelf. A popup will appear asking if you want it to be Mel or Python - choose Mel

Si
__________________
Examples of bTraffic - a traffic animation tool for Maya
bFlocking - a tool for Maya 8.5+ to generate flocking and swarming behaviours
Jan/Feb Challenge 2007 Entry and W.I.P
May/Jun Challenge 2006 Entry and W.I.P
Mar/Apr Challenge 2006 Entry and W.I.P
Jan/Feb Challenge 2006 Entry and W.I.P
Nov/Dec Challenge 2005 Entry and W.I.P
Sep/Oct Challenge 2005 Entry and W.I.P
Jul/Aug Challenge 2005 Entry
www.flash-fx.net

Last edited by t1ck135 : 20-10-2007 at 07:16 PM.
t1ck135 is offline   Reply With Quote
Old 21-10-2007, 04:18 AM   #3
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I know how to create, use and apply an image.
I just couldn't find the location of the icons besides some of the create polygons and NURBs icons. I thought I won't have to screenshot them because they should already exist.

And by copy a button I meant to move it (together with it's image) (like you MMB drag it to another shelf/bin) but I need it to stay in it's original location...

Benny
BennyK is offline   Reply With Quote
Old 21-10-2007, 10:01 AM   #4
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I found a way to copy a button but it doesn't work everywhere - Select the tool and MMB drag it's icon from the tool box.

I also encountered another problem when not doing it this way: When you double-click a button it doesn't open the tool settings like in a normal button.

Is there another way to copy a button which works with every button in the shelf?
Is there a way to make a custom button open the tool settings on double-click?
BennyK is offline   Reply With Quote
Old 21-10-2007, 10:17 AM   #5
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Also, how can I copy a menu button to the shelf(without using the script editor)? I've seen it in some videos but I can't manage to do that .
Thanks in advance,
Benny
BennyK is offline   Reply With Quote
Old 22-10-2007, 02:53 AM   #6
t1ck135
Registered User
 
t1ck135's Avatar
 
Join Date: May 2004
Location: UK
Posts: 1,991
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maya help - search for shelf info - very handy info
(Add a tool, action, or Maya script to a shelf)

copy = control + shift + middle mouse button and drag to required area

Copying wont pass on the double click action. Looking in the My Documents\maya\<version>\prefs\shelves section and opening one of the files shows that a -doubleClickCommand is assigned to control double clicks. I dont think editing the file works as maya refreshes it on startup (I havent confirmed that tho)
Alternatively have a look into the Commands or CommandsPython sections of the manual and it shows you the script editor commands to create shelf buttons (shelfButton) and control all the elements including double click.

go experiment
Si
__________________
Examples of bTraffic - a traffic animation tool for Maya
bFlocking - a tool for Maya 8.5+ to generate flocking and swarming behaviours
Jan/Feb Challenge 2007 Entry and W.I.P
May/Jun Challenge 2006 Entry and W.I.P
Mar/Apr Challenge 2006 Entry and W.I.P
Jan/Feb Challenge 2006 Entry and W.I.P
Nov/Dec Challenge 2005 Entry and W.I.P
Sep/Oct Challenge 2005 Entry and W.I.P
Jul/Aug Challenge 2005 Entry
www.flash-fx.net

Last edited by t1ck135 : 22-10-2007 at 02:58 AM.
t1ck135 is offline   Reply With Quote
Old 22-10-2007, 04:57 AM   #7
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Thumbs up Thanks

I configured the preferences and copied some sections from other shelves and it works so far...
Ctrl+Shift+MMB drag doesn't work to well...
Thanks again,
Benny
BennyK is offline   Reply With Quote
Old 23-10-2007, 03:09 AM   #8
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Cool After much hard work:

This is my custom shelf:
Attached Thumbnails
 
BennyK is offline   Reply With Quote
Old 23-10-2007, 03:10 AM   #9
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

And it's code:
Fell free to copy anything you want
Attached Files
File Type: mel shelf_modeling.mel (15.4 KB, 51 views)
BennyK is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.