Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

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 01-07-2007, 07:26 AM   #1
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

osabando is offline   Reply With Quote
Old 01-07-2007, 07:16 PM   #2
Posts: n/a

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

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;
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.

Shogunato 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-2017 SimplyMaya - vBulletinģ Copyright © 2000-2017, Jelsoft Enterprises Ltd.