While I was working on my first somewhat involved rigging project (for my Thesis), I realized I would need to constrain a large number of joints to a large number of other joints that could be very nearly identically named, save for a prefix. I decided to spend a few minutes writing a little Python script to automate this constraining process in order to save myself time (and so that the time that I did spend would be more enjoyable). The result was this little 75 line script that has worked quite well. If I get into more rigging, I’ll obviously script more portions of it, but for now this was quite helpful.
- Must have a Control skeleton, joints prefixed with “ctl_”
- Must have a Bind skeleton, joints prefixed with “bind_”
- Download the script here, and unzip it to your scripts directory
- Import “constrain_joints_ctl_to_bind”
- Select a node at or above the highest joint in the control skeleton hierarchy
- run constrain_joints_ctl_to_bind.constrain_joints( ) at the Python command line in Maya