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 29-12-2004, 05:46 PM   #1
pixelsoul
Subscriber
 
pixelsoul's Avatar
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Default X-Ray shortcut

In the tutorials you use an X-Ray shortcut now ive found a script which can do this only it does not say where i should put this?

And how can i make it a button on the custom menu ?

// 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.");
pixelsoul is offline   Reply With Quote
Old 29-12-2004, 09:34 PM   #2
keef
Subscriber
 
Join Date: Oct 2003
Location: Scotland
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Run in the script editor (bottom-left bottom in UI) from the pull-down menu, in the script editor, you can specify a shelf item....

Hope this helps....
keef is offline   Reply With Quote
Old 30-12-2004, 09:30 AM   #3
blomkaal
Subscriber
 
blomkaal's Avatar
 
Join Date: May 2004
Location: Denmark
Posts: 816
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Or you can run the script, select it in the script editor, and MMB drag it onto the shelf...

EDIT: The other way is probably better since you can then name the script...

Last edited by blomkaal : 30-12-2004 at 09:35 AM.
blomkaal is offline   Reply With Quote
Old 30-12-2004, 12:23 PM   #4
pixelsoul
Subscriber
 
pixelsoul's Avatar
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ah works great thanks allot, do you also know how i can modify the icon?
pixelsoul is offline   Reply With Quote
Old 31-12-2004, 04:18 AM   #5
R-Tillery
Subscriber
 
R-Tillery's Avatar
 
Join Date: May 2003
Location: Ventura California
Posts: 966
Thanks: 0
Thanked 1 Time in 1 Post
Default

Heres the one I use, its a lot better. do the script editor thing.
____________________________________________


// declare variables

string $selected[];

string $hilited[];

string $object;

int $test[];

int $hold;



// assign values to variables for selected objects

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

$hilited = `ls -hl -dag -ap -typ surfaceShape`;



// loop through any objects in component mode

// and toggle their x-ray display

for ($object in $hilited){

$test = `displaySurface -q -xRay $object`;

$hold = $test[0];

if ($hold != false)

displaySurface -xRay false $object;

else

displaySurface -xRay true $object;



// clear test variable

clear $test;

}



// loop through any objects in object mode

// and toggle their x-ray display

for ($object in $selected){

$test = `displaySurface -q -xRay $object`;

$hold = $test[0];

if ($hold != false)

displaySurface -xRay false $object;

else

displaySurface -xRay true $object;



// clear test variable

clear $test;

}



// clear selection variables

clear $selected;

clear $hilited;

// Result: 0 //
R-Tillery is offline   Reply With Quote
Old 01-01-2005, 06:20 PM   #6
pixelsoul
Subscriber
 
pixelsoul's Avatar
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmm your does not seem to work? also why is yours better ?

Ah nevermind i see nw it only x-rays selected parts this is better thanks

Last edited by pixelsoul : 01-01-2005 at 06:23 PM.
pixelsoul is offline   Reply With Quote
Old 01-01-2005, 09:27 PM   #7
R-Tillery
Subscriber
 
R-Tillery's Avatar
 
Join Date: May 2003
Location: Ventura California
Posts: 966
Thanks: 0
Thanked 1 Time in 1 Post
Default

It works good
R-Tillery 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.