Parenting a mesh to an armature

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
der_ton
Posts: 0
Joined: Mon Oct 20, 2003 1:02 am

Parenting a mesh to an armature

Post by der_ton »

In the UI, when you parent a mesh to an armature with Ctrl-P, you're presented with a question wether you want to parent it to a Bone, the Armature or the Armature Object. For skeletal animation, you have to select "Armature".
When I use armatureObject.makeParent() in python, it seems that that's the equivalent of the 3rd option in the GUI, and the mesh won't get deformed with the poses of the armature. Is there any way to do the parenting in the intended way with the Python API?

I'm continuing Bob Holcomb's MD5 import script and have almost everything working, including vertex groups setup. When I do that parenting to the armature by hand via the GUI after the script has run (I select "Armature", and "Don't create vertex groups", since the script created them already), the mesh deforms with the poses of the armature. If I do the parenting in python with makeParent(), it doesn't.

Post Reply