Accessing active selection's shape information

My apologies for the Maya reference ‘shape’

Im wondering is there a way to get to an object’s shape information via code.

By shape i am refering to what i think Blender calls object data.

Camera with location, rotation etc = Object/transform
Camera with lens settings, d.o.f settings etc = Object-data/shape

i know i can access it directly through bpy.data.cameras[‘Camera_Name’] but im wanting to get it via the user’s selection which is of the object.

Any ideas?

Cheers
Jono

LOL nevermind! just figured it out.

bpy.context.scene.objects.active.data :slight_smile:

Ah that is much more eloquent than Maya :D…

if you’re interested in the active object, you can abbreviate that line to

bpy.context.object.data