Here you find Addons for Blender.
Copy Vertex Order By UVs:
Blender Artists Thread: http://blenderartists.org/forum/showthread.php?250921
Note: this version is for Blender 2.65a, backward compatibility has been removed.
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.
Installation:
- Copy nuke_copy_indices.py to blender-2.xx-release-windows32\2.xx\scripts\addons
- Activate in “File -> User Preferences -> Addons -> Mesh -> Copy Vertex Order by UVs”
Usage:
- 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
Errors:
- The UVs must be almost identical in both meshes, EPSILON defined at the begin of the script defines how precise they must match. But if you increase it too much the mapping will no longer be unique and it will also fail.
- If multiple faces have the same UVs you can get problems too. If you have only few such locations you maybe have luck with randomizing vertex order.
- You can use the Select By Index Addon to analyze faces that cause errors (see in console what causes problems).
Algorithm:
- 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.
Select By Index:
Blender Artists Thread: http://blenderartists.org/forum/showthread.php?280370
Selects the specified face/edge/vertex given the index. In face selection mode it selects a face, in edge mode an edge and in vertex mode a vertex. It prints to the console UVs and vertex indices for faces and vertex indices for edges.
Installation:
- Copy nuke_select_by_index.py to blender-2.xx-releaseXX\2.xx\scripts\addons
- Activate in “File -> User Preferences -> Addons -> Mesh -> Select by index”
Usage:
- Go to edit mode, select the selection mode of what you want to select (face/edge/vertex)
- Enter the index of the face/edge/vertex you want to select
- Click “Select by index” button