Skip navigation

All objects in Maya are actually accessible by string.

So when you type

$var = `select -r objectName1`;

Maya will select that object in the viewport.

But $var doesn’t contain anything but a string! It just contains the string name for the current selection.

To iterate in maya, you need to use the polyEvaluate function, which retrieves things like the NUMBER of faces or vertices a polygon has.

Access of individual members of the polygon is by string:

Vertices: polyName.vtx[index]
Faces: polyName.f[index]

It turns out that the .vtx, .f, and .map are NOT objects. They don’t have a .size() member or anything, they’re just “string addresses”. When you address polyName.f[0], that’s the first face in the mesh. You have to pass the string address to a function to use it though.


Declaring arrays with a leading 0 doesn’t work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: