PDA

View Full Version : Adding Material IDs to selected Polys


Smay
10-10-2003, 11:47 AM
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?

LFShade
10-10-2003, 12:30 PM
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

Smay
10-10-2003, 05:24 PM
Aha, so the secret word was "polyop" :)
Now it works. Thank you very much.

CGTalk Moderation
01-16-2006, 07:00 AM
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.