Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Shortcuts? (https://simplymaya.com/forum/showthread.php?t=24454)

graphiac 31-12-2006 09:01 AM

Shortcuts?
 
I've just now discovered how to create shortcuts and they are very helpfull however.....
I do not have a three button mouse and in the general tab it has a button allowing you to temporarily switch you left mouse button to track which is very helpful and time saving.
The general tab is also cluttered with buttons I do not use how do I delete items from the bar? Or how do I add the track button to the custom bar? Any link or attachment giving the shortcut for the X-ray shading will also be greatly appreciated.

enhzflep 31-12-2006 09:39 AM

1 Attachment(s)
Thanx for the tip about the track tool - my mate with a laptop will be thrilled..

As for the shelves, if you goto Window->Settings/Prefferences->Shelves you'll get the shelf editor. The currently selected shelf is open in the window as defalt.

If you want to clear out the general tab of all the unnecessary stuff then just delete what you don't want.

On the other hand, if you want to add the button to your own shelf there's a number of ways you can go about this.
In any case, you should select the shelf you want to use first.

1) In the case of the command having a menu option you can hold ctrl-shift while you select the menu option. This will even give you an icon in most cases..

2) In the event that there doesn't seem to be a menu option, or for custom code (like the Xray script) you need to get the commands up to the shelf using the script editor. Open the script editor, and if you know the name of the command, type it in, highlight it, an then middle-mouse drag it up to the shelf - note that LMB+RMB wil work for dragging and dropping in many cases in Maya.

Another thing that's handy to know is that everytime you press a button, you can have the command echoed in the top panel of the script editor. Great for creating shelf icons for obscure commands hidden several menus deep.

As for the XRay stuff, I use two different scripts myself. One to toggle xray for everything, another to toggle xray for the selected objects only. Each has it's advantages. Just drag each to the shelf from the script editor.

Code:

///////////////////////////////////
// Xray selected obects only
///////////////////////////////////
string $sel[];
int $temp_var[];
int $value;

        $sel = `ls -sl -dag -ap -typ surfaceShape`;
       
        for ($obj in $sel)
        {
                $temp_var = `displaySurface -q -xRay $obj`;
                $value = $temp_var[0];
                if ($value == 1)
                        displaySurface -xRay 0 $obj;
                else
                        displaySurface -xRay 1 $obj;
        }

///////////////////////////////////
// Xray everything
///////////////////////////////////
int $xraystat;
$xraystat = eval("modelEditor -q -xray modelPanel4");
if ($xraystat == 1) $xraystat=0;
        else $xraystat=1;
modelEditor -e -xray $xraystat modelPanel1;
modelEditor -e -xray $xraystat modelPanel2;
modelEditor -e -xray $xraystat modelPanel3;
modelEditor -e -xray $xraystat modelPanel4;

As for the icons, I just made some red cubes up and then did screen shots first with one and then with all objects xrayed. Resized to 32x32 and saved with photoshop as bmps. Copy to your icon directory then tell the shelf editor where these icons are, and voila! The grey button with mel dissapears and you've got something positively more descriptive.

Anyway, here's the icons I'm using.
Simon.

graphiac 31-12-2006 01:55 PM

Wow awsome a world of help thanks so much the most helpfull response I've gotten


All times are GMT. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018