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)
-   -   Add Xray to Shelf (https://simplymaya.com/forum/showthread.php?t=21809)

Eldwick 02-06-2006 05:58 PM

Add Xray to Shelf
 
How would I add Xray to my shelf or preferably to a hotkey?

pbman 02-06-2006 08:59 PM

download the mel script on this site and follow the instructions that come with it

go to 'download' to find it

13th_resident 02-06-2006 09:13 PM

actually i'll tell you right NOW!

open up your script editor in maya.
go to Edit > Clear All. then paste the following to the bottom section of the script editor (Its called Input work area)


// Toggle Xray
//

string $visPanel[]=`getPanel -vis`;
int $mode;
if (size($visPanel)>0)
{
for ($panel in $visPanel)
{
if (`match "^modelPanel" $panel`=="modelPanel")
{
$mode=`modelEditor -q -xray $panel`;
if ($mode>0)
modelEditor -e -xray 0 $panel;
else
modelEditor -e -xray 1 $panel;
}
}
print ("\nxray="+$mode+".");
} else
print ("\nNo model panels to modify.");


after pasting it. highlight the whole code (ctrl + A) then go to File > Save Selected to Shelf, give a name to it. then it'll add the mel script onto the shelf that is active.

MattTheMan 02-06-2006 09:15 PM

cool! Thanks for posting that 13th! Did you write it?

13th_resident 02-06-2006 09:31 PM

i must confess, i didnt write it. i wish i had though. i did a few of the mel tutorials that come in with maya help files.
but i dont actually know it enough to start writing my own scripts.
iam planning on doing a few tutorials on it sometime in the near future.

Eldwick 03-06-2006 03:25 PM

Thanks!

Grev_Mivlos 05-08-2006 07:07 PM

Nice
 
Great thx, but i noticed that, in the Haunted house tutorial that

Kurt ( :bow: ) had an icon instead of the default icon it creates.

How Do you change that Icon ??

portermalone 07-08-2006 05:17 PM

go to Window- Preferences- Shelf Editor--

Once there, select the self that you have put the x-ray icon on, scroll down to the correct button( you should see in the line of shelf scripts the x-ray script that you inserted, also if your having trouble finding it, they're listed in the same order that you see them on the shelf.) Once selected, hit the change icon button and direct it to the path of the file you want to be your icon.

you can also make your own custom icons in photoshop, but make sure to save them as the right type of file or maya will not recognize it. Check the other icons to see what type of file, it's also a good idea to open one of the existing icons, edit it, and then save it as something else.

good luck


All times are GMT. The time now is 12:26 PM.

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