1
$\begingroup$

Can someone please explain me what is the difference between:

  • bpy.data.objects['Armature']
  • bpy.data.armatures['Armature']

I can see they have different types and properties:

>>> type(bpy.data.objects['Armature'])
<class 'bpy_types.Object'>

>>> type(bpy.data.armatures['Armature'])
<class 'bpy.types.Armature'>

bpy.data.objects['Armature'].pose is a valid object but bpy.data.armatures['Armature'].pose returns an error, why?

I also noticed bpy.data.objects['Armature'].data returns bpy.data.armatures['Armature']

What is their respective definition and for which purpose shall one be used vs the other?

$\endgroup$
2
$\begingroup$

Document here

bpy_types.Object is a container wrapper for inner data to communicate with Blender Scene and other stuff.

You can rename your bone and armature:

enter image description here

>>> C.object
bpy.data.objects['Obj Armature']

>>> C.object.data
bpy.data.armatures['Real Armature']

And with the tree display in outliner, that should be clear that Object has Pose properties and the armature itself doesn't.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.