SimplyMaya Forums

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

Home / forum / Lounges / Technical Issues / Shortcut for X-RAY
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 01-07-2007, 06:26 AM   #1
osabando
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Shortcut for X-RAY

How can do you do a shortcut for the X-Ray opcion on the shelf?, or as a keyboard shortcut, it doesn't appear on the hotkeys menu or as a command on the script editor for copying it

Thanks
osabando is offline   Reply With Quote
Old 01-07-2007, 06:16 PM   #2
Jr.Who
 
Posts: n/a
Default

Why didn’t you just Google “X-Ray MEL script”?
  Reply With Quote
Old 22-07-2007, 04:28 PM   #3
Shogunato
Registered User
 
Join Date: Jul 2007
Location: France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Enjoy
Shogunato 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.