Multimaterial issue
I am trying to a script, which will work on all geometries, separate them into separate objects based on material ids so that each resulting objects will have single material (not multimaterial).....here is the script upto now:
(
-- Collect objects from scene in working list
workingObject = #()
for o in Geometry do
(
append workingObject o
)
fn detachFBI obj =
(
objname = obj.name
ids = obj.material.materialIDList
for id in ids do
(
obj.selectbymaterial id
_faceSel = polyOp.getFaceSelection obj
polyOp.detachFaces obj _faceSel delete:true asNode:true name: (objname +"_tempdelface")
)
select $*_tempdelface*
$.name = objname
)
-- Run though all objects in array and detach them
for o in workingObject do
( mat = o.material
if (classof mat == Multimaterial) do
(
select o
detachFBI o
)
)
)
.......its working fine....but the resulting objects are still having the multimaterials assigned to them....whereas I want them to have only the single material. Any clue???

Comments
Hi Goonda... Try
Hi Goonda...
Try this...
kimarotta.com.br
3d Artist
Thanks a lot Kimarotto!!
Thanks a lot Kimarotto!!