|
Hi,
I am modeling from an image projected on a poly plane, I would like to know if there is a way to just make the x-ray go on the model I am making and not on the poly plane. In other words, how do you make x-ray only go on certain poly objects, but allow the other objects to render normally?
Any help appreciated,
Jason
|
|
|
|
Your best bet for doing this is to assign a shader to the stuff you want to Xray and raise the transparency.
If you right click over an object you can go to “Material Attributes...” to quickly change the transparency if you want to. If you have the same shader applied to more than one object, the changes you make will affect all of the objects...which could be helpful...or not.
I know it seems like a bit of a hack...hopefully someone has something better.
~Ben
|
|
|
|
Here’s a script that you can save as “xraySelected.mel”. Put it in your scripts directory and make a hotkey or a shelf item that calls it up.
Select your object and invoke the script, and your object is then in xray mode.
Props to Steve Mann for this one - I claim no credit.
global proc xraySelected()
{
// get selected shape nodes
string $result[] = `ls -sl -dag -s`;
for( $cnt = 0; $cnt < size( $result ) $cnt++ )
{
int $xState[] = `displaySurface -q -xRay $result[$cnt]`;
// toggle xray mode per object
displaySurface -xRay ( !$xState[0] ) $result[$cnt];
}
}
|
|
|
|
The script you posted didn’t quite work, at least for me. I cleaned it up a bit and should work for everyone.
global proc xraySelected()
{
string $sel[] = `ls -sl -dag -s`;
for ($s in $sel)
{
int $xState[] = `displaySurface -q -xRay $s`;
displaySurface -xRay ( !$xState[0] ) $s;
}
}
xraySelected;
Robert Vignone
http://www.robertvignone.com
Win 7 | I7 @ 3.6ghz | 24GB DDR3| GTX580 |
|
|
|
|
Actually I just took this a bit further.
This script will toggle xray on selected objects. If nothing is selected, will toggle xray on all objects.
global proc r_superXray()
{
string $select[] = `ls -sl`;
int $sizes = `size$select`;
if ($sizes >= 1)
{
string $mySel[] = `ls -sl -dag -s`;
for ($s in $mySel)
{
int $xState[] = `displaySurface -q -xRay $s`;
displaySurface -xRay ( !$xState[0] ) $s;
}
}
if ($sizes < 1)
{
string $all[] = `select -ado`;
displaySurface -xRay 0;
select -cl;
$currentPanel = `getPanel -wf`;
$mode = `modelEditor -q -xray $currentPanel`;
modelEditor -edit -xray (!$mode) $currentPanel;
}
}
r_superXray;
Robert Vignone
http://www.robertvignone.com
Win 7 | I7 @ 3.6ghz | 24GB DDR3| GTX580 |
|
|
|