TransWikia.com

Difference between bpy.data.objects['Armature'] and bpy.data.armatures['Armature']

Blender Asked by Alexis.Rolland on November 8, 2021

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?

One Answer

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.

Answered by HikariTW on November 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP