[Closed] Inconsistent face ids
hi
so i havea script that fixes out of range Ids for a editable poly that uses a multi sub material and for the most part it works correctly. When it doesent it is because max has skipped a face Id for some reason so when selecting all the faces the listener shows this
$.EditablePoly.SetSelection #Face #{1..4991, 4993..4995}
skipping face 4992, and this makes the script crash
Its possible to loop over all bits in a loop to make sure that the there are not any ids missing but im not sure why max does this, any ideas?
The other thing is that in the script it converts the object to an editable poly which doesent fix the issue, but if i convert it to an editable mesh and back then it fixes itself and show this
$.EditablePoly.SetSelection #Face #{1..4994}
which then obviously loops over each face fine
thoughts?
thanks
probably your poly has ‘dead’ structs (verts, edges, or faces). you can check it using:
polyop.getDeadVerts, polyop.getDeadEdges, polyop.getDeadFaces
and fix by using:
polyop.CollapseDeadStructs
(see the mxs help for details)