SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 14-12-2005, 11:22 PM   #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, 12: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, 14 views)
__________________
Image dump
vladimirjp is offline   Reply With Quote
Old 15-12-2005, 05: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 05:26 AM.
Anhslaught is offline   Reply With Quote
Old 15-12-2005, 06: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, 11:41 AM   #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
Click image for larger version

Name:	hotkey.jpg
Views:	49
Size:	31.1 KB
ID:	25695  
__________________
Image dump

Last edited by vladimirjp : 15-12-2005 at 11:43 AM.
vladimirjp is offline   Reply With Quote
Old 15-12-2005, 07: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.