Notifications
Clear all

[Closed] Adding Material IDs to selected Polys

Hi there,
I wonder if there is a command to change the Material ID of some selected polygons. There is a “setFaceMatID”-command to change the Material ID of faces, but it doesn´t work for editable poly objects and I won´t convert the object to editable mesh. Any idea?

2 Replies

From the MXS online help:

“polyOp.setFaceMatID <Poly poly> <facelist> <int MatID>”

So if you wanted to assign ID 1 to the selected faces of the selected EPoly object, you would do something like this:

sel_faces = polyOp.getFaceSelection $
polyOp.setFaceMatID $ sel_faces 1

RH

Aha, so the secret word was “polyop”
Now it works. Thank you very much.