— [update 2013-01-31 - new release v0.6] —
Twice as fast. Simplified algorithm.
— [update 2013-01-31 - new release v0.5] —
Faster now, again for blender 2.65a.
— [update 2013-01-29 - new release v0.4] —
Now for blender 2.65a. Support for older versions removed.
— [update 2012-04-19 - new release v0.3] —
Works with Blender 2.62 (non-BMesh) and 2.63rc1 (BMesh) now. However, in 2.63 it is about 10-20 times slower, because accessing the UV-Mapping is much slower. Will look into this later.
Since code has been improved you should also update if you are only using Blender 2.62.
— [original post] —
Creates copy of active mesh with vertex order of selected mesh. Many cool operations are only possible if vertex order matches. However, some external programs save the mesh back in other orders. The addon requires that the UV-Mapping of both meshes is identical.
- Copy nuke_copy_indices.py to blender-2.62-release-windows32\2.62\scripts\addons
- Activate in “File -> User Preferences -> Addons -> Mesh -> Copy Vertex Order by UVs”
- Select two meshes (with identical UV mapping)
- In Object Menu click “Copy Vertex Order by UVs”, creates copy of 2nd mesh with vertex order of 1st mesh
- You can use this to analyze faces that give you errors (see console): http://blenderartists.org/forum/showthread.php?280370
- For both meshes build min-heap of vertex lists by number of occurance of a certain vertex degree in the mesh (degree as number of faces containing a vertex)
- First step of the loop: map verts, candidate set is all unmapped verts with degree X [ aka map(pop(minheap1), pop(minheap2)) ]
- second step of loop: loop: expand mappings found in step one: candidate set is a vertex that was mapped in step one or two.
Note: The Algorithm could be optimized. At the moment it is conservative in the sense that it verifies that a vertex is mapped to the same vertex for all its faces. It also checks all vertices of the current candidate set against each other. That way we are sure we find a single unique mapping. But since the candidate set is choosen by topological features it should still be orders of magnitude faster than any n*n approach just comparing all vertices, for meshes of a certain size.