I want to retrieve an armature by name and access its bones. However, this doesn't work:
armature = bpy.data.objects["rig"]
bones = armature.bones
It gives the error
'Object' object has no attribute 'bones'`
The "rig"
object is found, and the armature variable holds a bpy_struct
after the first line executes.
So how do I access the bone data?