If your needs are not simple and you actually have to re-order "every" vert's order to match another model whose vertex size is the same ( and is essentially the same model. Tho I suppose the following is valid for any "UV matchable area" )
Chances are you have committed to UV layouts already and have turned on the "preserve UV" option and/or transfered UV information back when appropriate keeping the "same" UV landscape?
( even if vert order has gotten away from you between two different versions of a model. chances are visual feedback assured that UV integrity has remained the same? )
In such a case...
simply use the model ( morph shape? ) with the correct vertex order.
compare and correct that morph shape's vertex positions using the UV layout as a key.
UV position is what we would be comparing against and not uv the map.
The script would build vertex position one at a time in this way till done.
For every vtx in the shape to be captured>
vert's UV = polyListcomponentConversion -fv -tuv;
polyEditUV -q vert's UV;
that result u v stored in the same order as that corresponding verts position.
On the Morph mesh with the correct vertex order but incorect position...
we find the corresponding vert:
MMvert's UV = polyListcomponentConversion -fv -tuv;
polyEditUV -q MMvert's UV;
The position stored in the same order as each corresponding UV position is applied to that vertex...
repeat till done! Transfer skinning hopefully when done!
Unless I am overlooking something ( and the uv assumption is valid for your case )
I imagine that would do the trick.
Even if yer UVs are hosed as well.. All hope might not be lost?
Sometimes depending on your workflow there might be similar maps applied to both models that survived vertex order.
For Instance, sets command can be useful inscripts as well as Blind Data and vertex color to map vertex order ahead of time before a destructive action. ( depending on which actions... combine for instance is to destructive for such a strategy. But within a scripts order where you have ultimate control using Sets instead of ls will retain vertex order further allowing u to make boolean sets within that capture! )
Even outside the control of a script perhaps a map exists that you can still leverage?
Without your project on my desktop, it's really hard to say if an even easier fix is available?
What poopipe suggest could be a quick fix? Trying to guess yer exact usage??
Originally Posted by mLink
Alright, our programmer brought to our attention that each sub-mesh of a model may only have 40(ish) bones. The model in question has 79 bones, so must be broken up into at least 2 sub-meshes.
However, the vertex numbers are in an "illogical order."
i.e.- vertex #1 is on the face, vertex #2 is on the knee.
So instead of the model being split in half at the waist or something, it is being split into about 6 sub-meshes.
If for instance u need all the lower vertices on the bottom half of yer model
and all the higher numbered vertices on the upper part of the model you could make two duplicates ( giving you 3 versions in this example )
- kept in it's original state to transfer back any skinning or uv information
- half the model representing the lower body
- half the model representing the upper body
When you combine both parts select the half of the body that should have the lower numbered vertices first.
Hope that helps ( hoping someone else actually feels like doing the actual writing poke poke poke... )