View Full Version : how to assign id to selected poly face?
use maxscript,
how to assign id to selected poly face?
does anyone know how to do ?
thank you!!!
|
|
Impus
07-03-2005, 08:34 PM
curSelFace = getFaceSelection selection[1].mesh
for eachFace in curSelFace do
(
setFaceMatID selection[1] eachFace 4
)
where the '4' in 'setFaceMatID selection[1] eachFace 4' is the material ID you want.
Light
07-04-2005, 02:35 AM
OR
local sel = selection[1].baseObject
polyOp.setFaceMatID sel (polyOp.getFaceSelection sel) matID
Light
Thank you Impus and Lignt!!
I have a question ,I hope you can help me thank you
curSelFace = getFaceSelection selection[1].mesh
for eachFace in curSelFace do
(
setFaceMatID selection[1] eachFace 4
)
This code ,when use mesh it can work but use poly ,it can't work .why?
Light
07-04-2005, 04:29 AM
Because getFaceSelection & setFaceMatID are Editable Mesh fns. So you will need to use their Editable Poly correspondings in order to use Editable Polys.
You can make your code work for both of them by using the classOf method.
Light
Thank you Lignt
i know maxscript little
Can you help me write it
Thank you very very much!
Light
07-04-2005, 07:19 AM
OK, try this:
(
local sel = selection[1]
case classOf sel of
(
editable_poly: polyOp.setFaceMatID sel (polyOp.getFaceSelection sel) 7
editable_mesh: for i in (getFaceSelection sel) do setFaceMatID sel i 7
)
)
CGTalk Moderation
07-04-2005, 07:19 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.