Get Used Material ID List from EditablePoly without face check

Hello,

Everybody on other forums use the check every face to read the Used Material IDs from an object, but there is a basic ID list in Editable Poly. I attached an image about it.

The only problem is that there is no chance to read this list from the Editable Poly.

Do somebody knows how can i read this list by script?

AttachmentSize
materialidlist.jpg77.43 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

Thanks a million Vojtěch.
I couldn't run it in 2014 (Global.IGameMesh is absent), but in 2016 works just fine. But it is surprisingly slow compared to what I've posted above. 4kk mesh processed in about 9-10sec

Swordslayer's picture

 

Yeah, IGameMesh is more about convenience than speed, though I wouldn't have expected it to be that slow either. That sounds like even snapshotAsMesh+getFaceMatID in maxscript would be faster.

jahman's picture

.

.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.