Centering joints in edge loops
When I’m rigging, I will often create an initial ‘rig-skeleton’ that fits inside the mesh to be deformed. To speed things along, I first just rough in the joint positions by snapping them to verts. But later I like to get them centered into a selection of verts, and usually that selection is some form of edge loop.
I wrote some mel that does this:
- You pick a joint, and an edge on a mesh
- The code detects the joint, and the edge
- Based on the edge, find the edge loop
- Convert the edge loop into a selection of verts
- Find the average position of all the verts
- Move the joint pivots to this new position
- Reselect the joint, and the new vert selection.
You can find the mel code over on my Mel Wiki.