setAttribute and var.attribute

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 05 May 2009   #1
setAttribute and var.attribute

Me again ... 'nother question:

I'm trying to write a script to select all the shapes in a scene and change the render stat attributes Double Sided and Opposite to false (0)...

This is where I got
    select -allDagObjects;
   	setAttr "doubleSided" 0;
    setAttr "opposite" 0;

other version
    string $sel[]=`ls -geometry`;
   	setAttr "$sel.doubleSided" 0;
    setAttr "$sel.opposite" 0;

both of them spit errors...

I really just don't know how to do what I'm trying to do...

I also do understand how to use something like var.attribute.
Blake Withers sometimes known as AlizarinCrimson

Old 05 May 2009   #2
you are very close with you script here another version.

string $sel[]=`ls -geometry`;
for($each in $sel)
	setAttr ($each + ".doubleSided") 0;
	setAttr ($each + ".opposite") 0;
Old 06 June 2009   #3
thanks ... that's so obvious ... Thanks so much!
Blake Withers sometimes known as AlizarinCrimson

Old 06 June 2009   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

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
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:17 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.