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)
-   -   X-Ray question (https://simplymaya.com/forum/showthread.php?t=22340)

lordeugenius 15-07-2006 12:47 AM

X-Ray question
 
Hi! I have a question, if you can help me please: how can i insert the x-ray button into the custom tab in shelf, i know that for the other buttons you must press ctrl+shift and left mouse button but this doesn't work for x-ray. Please help!!! I appreciate.

jsprogg 15-07-2006 07:12 AM

Ok this should get you going

Copy & past this to the script editor then middle mouse button drag to your shelf.

string $sel[];
int $temp[];
int $value;

$sel = `ls -sl -dag -ap -typ surfaceShape`;

for ($obj in $sel){
$temp = `displaySurface -q -xRay $obj`;
$value = $temp[0];
if ($value == 1)
displaySurface -xRay 0 $obj;
else
displaySurface -xRay 1 $obj;
}

lordeugenius 15-07-2006 10:55 AM

nope, not working, it gives me a sintax error

13th_resident 15-07-2006 11:40 AM

i made a post on how to make add the x-ray onto your shelf.
click me

cheers

lordeugenius 15-07-2006 07:25 PM

Thanks man but doesn't work either, now it doesn't give me any errors but nothing's happening. I'm going crazy!

portermalone 16-07-2006 02:29 AM

go to the download section of this website and download the x-ray script from danny. Then open that .mel script with notepad or something and copy the code. Go into maya and open your script editor. In the bottom window of the script editor paste the code you copied from the .mel scrpit. Highlight the script you just pasted in the bottom window of the script editor. Move your mouse over the highlighted script, middle mouse button click and hold over the script, drag the script to the shelf and let go of the middle mouse button. You should now have a button that says MEL this is your x-ray button. You can change the icon and name to match kurts, or make it what ever you want after that.


Good luck

lordeugenius 16-07-2006 11:48 AM

:headbang: Not working, i did exactly what you wrote and nothing, i don't know what to do, I quit, thanks for everything guys, I appreciate.

pixelsoul 17-07-2006 10:25 AM

I remember there was a script which you can add to your toolbar :) you can even toggle off and on for each object.


All times are GMT. The time now is 08:30 AM.

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