Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

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 15-12-2005, 12:22 AM   #1
Anhslaught
Subscriber
 
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Anhslaught is offline   Reply With Quote
Old 15-12-2005, 01:12 AM   #2
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

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, 12 views)
__________________
Image dump
vladimirjp is offline   Reply With Quote
Old 15-12-2005, 06:23 AM   #3
Anhslaught
Subscriber
 
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Anhslaught is offline   Reply With Quote
Old 15-12-2005, 07:20 AM   #4
Anhslaught
Subscriber
 
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
Anhslaught is offline   Reply With Quote
Old 15-12-2005, 12:41 PM   #5
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

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
 
__________________
Image dump

Last edited by vladimirjp : 15-12-2005 at 12:43 PM.
vladimirjp is offline   Reply With Quote
Old 15-12-2005, 08:14 PM   #6
Anhslaught
Subscriber
 
Join Date: Jun 2004
Location: San Jose, CA
Posts: 490
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Anhslaught 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-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.