Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Wavefront software > Here's xray sha...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 46 of 118
Post > Topic >>

Here's xray shader mel script from digital tutors I think..

by <happ@[EMAIL PROTECTED] > Apr 8, 2004 at 05:34 PM

// ----------
// dlXray.mel
// ----------
// DATE:	05/24/2003, rev. 06/17/2003
//
// AUTHOR:	David LeFebvre
//
// COMPANY:     PL Studios, Inc.  Digital-Tutors.com
//
// DESCRIPTION:	This script will toggle the x-ray display of the shape
//		nodes for all selected surfaces.
// USAGE:	select one or more surfaces, execute the procedure
//
// EXAMPLE:	select -r spere1; dlXray;
//
// DISCLAIMER:  Use this an all scripts at your own risk.  PL Studios,
Inc. will not be responsible
//              for any data loss or file corruption from the use of this
script.

global proc dlXray (){

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




 1 Posts in Topic:
Here's xray shader mel script from digital tutors I think..
<happ@[EMAIL PROTECTED  2004-04-08 17:34:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 14:49:04 CDT 2008.