View Single Post
# 1 13-02-2009 , 12:12 PM
abie1's Avatar
Subscriber
Join Date: Mar 2003
Location: Miami, fl
Posts: 45

Accessing a nodes shapeNode via MEL

Let's say that I have a ton of geometry in a scene, hypothetically speaking, and I want to turn off the primaryVisibility of all of the said geometry, but I don't want to have to select each object one by one and then tick the primaryVisibility option in the objects' renderStats. I thought that I could write a "for-in" loop that would work but I don't know how to access a given object's primaryVisiblity attribute. Is there a way to do this? Or am I going about this the wrong way altogether? Any help would be greatly appreciated.

Here's the code:


Code:
string $spheres[] = `ls -sl`; 
string $currentSphere; 
for ($currentSphere in $spheres)
{

 } 
print "The primary visibility has been turned off for all of the selected geometry.";