Notifications
Clear all

[Closed] Better way of rebuilding the tVert order in meshes

hi

I have an object and when selecting all the uv/tVerts in the unwrap mod (by hand) i can see that there are gaps in the order of the bitarray such as

$A_Model.modifiers[#unwrap_uvw].unwrap6.selectVerticesByNode #{1..99, 550..565, 572..577, 584..595, 608..613, 626..631, 638..643, 650..727, 746..754, 773..781, 809..826, 836..853, 872..880, 890..925, 935..943, 953..961, 989..997, 1007..1024, 1034..1042, 1052..1060, 1088..1096, 1142..1177} $

so when i run through a script loop to access each tVert it fails in this case when it gets to tVert 100. It makes more sense to me to try and reorder this to be 1…numTverts. This is possible by converting a mesh with an unwrap mod on top to a mesh, this forces a rebuild and the tVerts are then in order and compacted, but i dont like this and am hoping there is a better way such a recalc mesh function i dont know about and haven’t found in the docs.

I have tried updating the mesh, convertToPoly and back and they havent worked, my next option is to build the mesh again by getting all the data sorting it and then building a new mesh, UNLESS hopefully someone will tell me of a better way, cos this seem massive overkill.

Suggestions would be welcome
thanks

1 Reply
meshop.buildMapFaces msh 1

seems to work