PDA

View Full Version : hotkey -> toggle x-ray ?


lowkey
07-04-2002, 09:52 AM
hi all,

just wanted to know if "shading->shade options->x-ray" from the viewports-menubar is assignable to any hotkey ?!

i simply can't find that option via the hotkey-manager. :shrug:

bigfatMELon
07-04-2002, 09:56 AM
Go to highend3D.com and download toggleMania. This gives you a nice UI to build toggle commands that can be attached to hotkeys or saved as buttons. It supports a ton of toggle items and even lets you build multi-toggles.

To run it, just type toggleMania "UI" at the command line to get the UI.

-jl

lowkey
07-04-2002, 10:04 AM
wow, that was really fast !!! :thumbsup:

thanks a lot ... :)

-wT-
07-04-2002, 11:33 AM
Dunno if you still need it, but this is what I did a while back:

proc int getXrayState ()
{
int $isXray = eval("modelEditor -q -xray modelPanel4");
return $isXray;
}

int $isXray = `getXrayState`;
print $isXray;
if ($isXray < 1)
modelEditor -e -xray 1 modelPanel4;
else
modelEditor -e -xray 0 modelPanel4;

lowkey
07-04-2002, 01:17 PM
thx a lot -wT-, but the script BFM posted already served my needs and far beyond ! :thumbsup:

bigfatMELon
07-04-2002, 06:17 PM
Oh yah, just an FYI for everybody. I wrote ToggleMania a while back because I got tired of seeing so many different little scripts that all do essentially the same thing, and more bothered by how everyone new to Maya gets stumped by the lack of toggles (as was I when I started). As a newbie, it's an aggrevating problem with no clear solution... until you ask a group of people like this one, of course.

So I figured I'd write the mother of all toggling scripts. One that lets you build your own toggling scripts without having to know how to script. :)

-jl

lowkey
07-06-2002, 06:53 PM
that's pretty plain cool, man ... thank you once more ... you just "de-complicated" my workflow a lot ! :thumbsup:

rob-beddall
07-04-2003, 12:42 PM
hey!!:wavey:

i've just downloaded the script but i haven't tried it yet.
i thinkit will solve 1 of my problems ( togglin' the x-ray) but i have a 2nd problem.

when modelling with reference planes, how do i put the x-ray on the model only? ( so that the reference planes remain fully visible)

hope somebody can help. or at least tell me i'm doing it wrong and give me the proper method to do what i want.

cheers!!

lowkey
07-04-2003, 12:51 PM
you'll have to attach your reference images directly to your orthogonal cameras (front/side/...), that way they won't be affected by the x-ray toggle!

damn, this really is an old freakin' thread...:eek:

rob-beddall
07-04-2003, 01:41 PM
hey!!:wavey:

thanks for the info Lowkey.

errr, would you mind telling me how to attach the image planes to the camera?

i'm guessin' it's pretty easy and i can figure it out for myself, but i don't want to be stuck over the weekend not knowing how to do it. finish work in 2 hours see, and i don't have the internet at home.

cheers!!:beer:

lowkey
07-04-2003, 01:58 PM
ok, here's how to do it:

select the camera you want to put your reference image to and select view->image plane->import image' from the corresponding viewport-menu.

go into the attribute editor of the camera node, hit the imagePlane-tab, specify the image file and select if you want it to be fixed in position or directly attached to the camera.

for most common modelling task, i'd prefer the latter, but check it out for your self! :thumbsup:

have phun!

rob-beddall
07-04-2003, 02:14 PM
hey!!:wavey:

thanks lowkey, you just saved me what could have been hours.

i was always told to actually model the planes then attach the textures manually through the hypershade. dunno why that is?

i'll give what you said a try and hopefully everything will work out for the best.

cheers!!:beer:

lowkey
07-04-2003, 02:47 PM
no problem at all... :thumbsup:

the geometry-approach (having two polyPlanes with attached materials) has the advantage of being able to put the imagePlanes onto layers, the visibility of which can be easily switched on and off, while modelling. that's why lots of people do it!

Andrei2k
12-22-2004, 07:41 AM
Although you can also place image planes on layers as well...

The only issue with the x-ray script above seems to be that it calls modelPanel14 specifically but need to call either 11, 12, 13 or 14 (persp, top, side, front) depending on what the focus is set on.

seven6ty
12-22-2004, 09:20 AM
I like this one, it automatically toggles the window based on what panel your mouse is over, it doesn't even have to be the actively used viewport:

string $currentPanel = `getPanel -underPointer`;

if(`modelEditor -q -xray $currentPanel `!=0)modelEditor -e -xray 0 $currentPanel ;

else modelEditor -e -xray 1 $currentPanel ;

Iconoklast
12-22-2004, 09:56 AM
if you download the digital tutors xray script (www.backwaterbunch.com (http://www.backwaterbunch.com) I believe), that will allow you to toggle xray mode on selected objects and not on a whole viewport, which is beneficial for obvious reasons.

CGTalk Moderation
01-13-2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.