Notifications
Clear all

[Closed] remove unused sub-materials from a mesh

I have a mesh that i have imported into max. The mesh is using multimaterial and after editing the mesh in max some of sub-materials can become useles, so I want to remoove them. At the moment my solution looks like this:

newmsh = mesh numverts:3 numfaces:1

meshop.attach newmsh msh attachMat:#IDToMat condenseMat:true deleteSourceNode:true
meshop.deleteverts newmsh #{1…3}

where mesh is my mesh, I want to remoove unused sub-materials from. I was already tolld that this solution is not the best and can cause sometimes problems, but unfortunatelly I have not found any beter one. Have to mention, that I need a solution worcking with posibly all max versions.

1 Reply

Any help?