hi, I need to change the 'primary visibility' and 'visible in refractions' on 100's of simillar objects for a render...then set them all back for another render...the script editor shows: select -r big_high_group16|big_high_nurbsSphere140 ; setAttr "big_high_group16|big_high_nurbsSphere140|big_high_nurbsSphereShape140.primaryVisibility" 0; setAttr "big_high_group16|big_high_nurbsSphere140|big_high_nurbsSphereShape140.visibleInRefractions" 0;
I can grock the setAttr part...but I'm not familliar enough with mel to write a script that will loop through all the objects and change these attributes...then back again....
is there an exsisting script that will do this (or one that I'd be able to modify)...or a way to select a bunch of objects and change an attribute for ALL of them at once?
here's a simple script that will do it. it is written to toggle the modes from 0 to 1 if they're at 0, or vice versa. i wrote it so that whatever is selected will be effected, so select whatever you want then run this:
string $temp[] = ls -sl -l; string $thing; for ($thing in $temp) { string $pvis = ($thing + ".primaryVisibility"); string $visR = ($thing + ".visibleInRefractions");