XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : setAttribute and var.attribute

05-30-2009, 05:23 PM
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.

05-31-2009, 01:42 AM
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;

06-01-2009, 01:24 PM
thanks ... that's so obvious ... Thanks so much!

CGTalk Moderation
06-01-2009, 01:24 PM
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.