Hi All,
I am working on a way to import characters from makehuman, already rigged, complete with shape keys to make realistic joint deformation. I have written some patches for makehuman that allow the poses to be controlled via a unix socket, and return vertex positions when asked. As regards the blender end, this is the process that the script will complete:
- Import the complete mesh in default pose from makehuman. – DONE - works.
- Import armature. – Doing manually for now.
2a. Make armature parent of mesh using bone heat. – Doing manually for now. (I wll probably ask how to do this using python later)
for pose in poses:
3. Pose armature – Doing manually for now.
4. Apply same pose to makehuman character. – DONE - works.
5. Import vertex positions for pose. – DONE - works.
6. Create a shape key for the posed mesh. THIS IS THE PROBLEM!!!
I don’t know how to control a shape key for a posed mesh in python. I can easily apply the shape to the default un-posed mesh, but this does not help me. I have tried baking the (bad) shape of the pose, and comparing it to the (good) shape received from makehuman, and applying the differences in vertex positions to the default (unposed) mesh, but this doesn’t give the expected result.
I would like to specify the vertex positions for the mesh while it is in the required pose. This is simple to do manually, but how do I do it in python?