Parent object to Bone

Anyone know in python how to get the bone that you have an object parented to?

nvm, im dumb.

Ïf your armature is called aName and your bone of interest is called bName, the following code shall tell you its parent (if any):


from Blender import *

aName = "Armature"
bName = "Arm_L"
a = Armature.Get(aName)
bn = a.bones[bName]
if (bn.hasParent()):
    pa = bn.parent
    print pa
else:
    print "No parent..."
print


It’s 2.49…

Regards,