Blender python is pretty competent. A structured way to do this scripting is to write your own addon, but if you go to the text/script view you can run arbitrary scripts.
If you have a selected rig object containing a bone called "leftleg", you can access it through:
- Code: Select all
import bpy
obj = bpy.context.scene.objects.active
armature = obj.armature
bpy.ops.object.mode_set(mode='POSE')
bones = self.armature.pose.bones
leftleg = bones['leftleg']
The variable leftleg is then an instance of this:
https://docs.blender.org/api/blender_py ... eBone.html(the above is out of my head and not tested, might contain typos)