Okay, bit of background: I’m relatively new to python, but I’ve coded a little application that lets the user pose his/her armatures and therefore models using the Xbox Kinect for 360. It works via the game engine so the user could theoretically make a game that is controlled by the player’s physical bodily movements.
All that works fine, but now I want the python script to record the bone animations onto the timeline so they can be accessed after the game engine has closed.
So far, I’ve got the code that’ll add a keyframe, which goes something like this:
obj = bpy.data.objects["Armature"] obj.keyframe_insert(data_path="location", frame=1.0, index=2) obj.location = 1.0 obj.keyframe_insert(data_path="location", frame=2, index=2)
Of course, that only makes a key-frame for the armature, not the bones. What I want to know is, how can I create a variable of the same type of obj, but that represents the bones contained within the armature?
Sorry if my explanation isn’t very good, but can anyone help plz?