Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 15-12-2005 , 12:22 AM
Subscriber
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490

Backface Culling

How do I add backface culling to my shelf?
Shift/cntrl lftmouse doesnt work.

When using backfaceculling on and off, the commands doesn't appear in the script editor either.

# 2 15-12-2005 , 01:12 AM
vladimirjp's Avatar
Subscriber
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
here is a script that toggles culling per object.

assign it to a hot key as short cut. like alt+1 or something

Attached Files
File Type: mel backfaceswitch.mel (448 Bytes, 223 views)
# 3 15-12-2005 , 06:23 AM
Subscriber
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
cool thank you, I'll try it right now, but isn't there a way to put it in the shelf also?


Last edited by Anhslaught; 15-12-2005 at 06:26 AM.
# 4 15-12-2005 , 07:20 AM
Subscriber
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Ok i got this one for the shelf, which works good.

Backface Culling On:
toggleSurfaceBackfaceCulling();


Backface Culling On/off:
string $Cursel[]=`ls -sl`;
int $bfc = `getAttr ( $Cursel[0] + ".backfaceCulling" )`;

if ($bfc == 0){
setAttr ( $Cursel[0] + ".backfaceCulling" ) 3;
print "Backface Culling Full";
}else{
setAttr ( $Cursel[0] + ".backfaceCulling" ) 0;
print "Backface Culling Off";}
-----


But I'm not sure how to use that script you posted. I went to Hot Key to try and upload it, but theres nothing to upload it. How do you use that? Paste it in script editor also?? If by doing that, how would I assign a key to it?

# 5 15-12-2005 , 12:41 PM
vladimirjp's Avatar
Subscriber
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
just take the srcipt, paste it into script editor, then select the script by highlighting it, then mmb drag it onto a shelf.
to assign it as hot key
go to windows>prefs>hotkey editor

when the window pop up, scroll down to "user" tab,
then click new,
then paste the script into command. give it a name and description [optional]
then choose a hot key to assign it to.

this is what i have in my script instead of what i posted above.

global proc tglCulling()
{
if(`window -q -ex tcwin`)
{
if(`intField -q -v if1` == 0){ polyOptions -fb -bcv on; intField -e -v 1 if1; }
else{ polyOptions -bc -bcv off; intField -e -v 0 if1; }
}
else
{
window -ret -vis off tcwin; columnLayout; intField -v 0 if1;
}
}tglCulling();

Attached Thumbnails

Last edited by vladimirjp; 15-12-2005 at 12:43 PM.
# 6 15-12-2005 , 08:14 PM
Subscriber
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Hey awesome help. I really really appreciate it.
It all works just fine, except when I use hot key it gets errors, but it still work, so I'm not sure what the error is. It works though so I'm content. Thank's a lot. user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads