SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 29-12-2004, 04: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, 08: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, 08: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 08:35 AM.
blomkaal is offline   Reply With Quote
Old 30-12-2004, 11:23 AM   #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, 03: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, 05: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 05:23 PM.
pixelsoul is offline   Reply With Quote
Old 01-01-2005, 08: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.