Context Access (bpy.context)

The context members available depend on the area of blender which is currently being accessed.

Note that all context values are readonly, but may be modified through the data api or by running operators

Screen Context

bpy.context.scene
Type :bpy.types.Scene
bpy.context.visible_objects
Type :sequence of bpy.types.Object
bpy.context.visible_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.selectable_objects
Type :sequence of bpy.types.Object
bpy.context.selectable_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.selected_objects
Type :sequence of bpy.types.Object
bpy.context.selected_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.selected_editable_objects
Type :sequence of bpy.types.Object
bpy.context.selected_editable_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.visible_bones
Type :sequence of bpy.types.Object
bpy.context.editable_bones
Type :sequence of bpy.types.EditBone
bpy.context.selected_bones
Type :sequence of bpy.types.Bone
bpy.context.selected_editable_bones
Type :sequence of bpy.types.Bone
bpy.context.visible_pose_bones
Type :sequence of bpy.types.PoseBone
bpy.context.selected_pose_bones
Type :sequence of bpy.types.PoseBone
bpy.context.active_bone
Type :bpy.types.Bone
bpy.context.active_pose_bone
Type :bpy.types.PoseBone
bpy.context.active_base
Type :bpy.types.ObjectBase
bpy.context.active_object
Type :bpy.types.Object
bpy.context.object
Type :bpy.types.Object
bpy.context.edit_object
Type :bpy.types.Object
bpy.context.sculpt_object
Type :bpy.types.Object
bpy.context.vertex_paint_object
Type :bpy.types.Object
bpy.context.weight_paint_object
Type :bpy.types.Object
bpy.context.texture_paint_object
Type :bpy.types.Object
bpy.context.particle_edit_object
Type :bpy.types.Object
bpy.context.sequences
Type :sequence of bpy.types.Sequence
bpy.context.selected_sequences
Type :sequence of bpy.types.Sequence
bpy.context.selected_editable_sequences
Type :sequence of bpy.types.Sequence

View3D Context

bpy.context.selected_objects
Type :sequence of bpy.types.Object
bpy.context.selected_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.selected_editable_objects
Type :sequence of bpy.types.Object
bpy.context.selected_editable_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.visible_objects
Type :sequence of bpy.types.Object
bpy.context.visible_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.selectable_objects
Type :sequence of bpy.types.Object
bpy.context.selectable_bases
Type :sequence of bpy.types.ObjectBase
bpy.context.active_base
Type :bpy.types.ObjectBase
bpy.context.active_object
Type :bpy.types.Object

Buttons Context

bpy.context.world
Type :bpy.types.World
bpy.context.object
Type :bpy.types.Object
bpy.context.mesh
Type :bpy.types.Mesh
bpy.context.armature
Type :bpy.types.Armature
bpy.context.lattice
Type :bpy.types.Lattice
bpy.context.curve
Type :bpy.types.Curve
bpy.context.meta_ball
Type :bpy.types.MetaBall
bpy.context.lamp
Type :bpy.types.Lamp
bpy.context.camera
Type :bpy.types.Camera
bpy.context.material
Type :bpy.types.Material
bpy.context.material_slot
Type :bpy.types.MaterialSlot
bpy.context.texture
Type :bpy.types.Texture
bpy.context.texture_slot
Type :bpy.types.MaterialTextureSlot
bpy.context.bone
Type :bpy.types.Bone
bpy.context.edit_bone
Type :bpy.types.EditBone
bpy.context.pose_bone
Type :bpy.types.PoseBone
bpy.context.particle_system
Type :bpy.types.ParticleSystem
bpy.context.particle_system_editable
Type :bpy.types.ParticleSystem
bpy.context.cloth
Type :bpy.types.ClothModifier
bpy.context.soft_body
Type :bpy.types.SoftBodyModifier
bpy.context.fluid
Type :bpy.types.FluidSimulationModifier
bpy.context.smoke
Type :bpy.types.SmokeModifier
bpy.context.collision
Type :bpy.types.CollisionModifier
bpy.context.brush
Type :bpy.types.Brush

Image Context

bpy.context.edit_image
Type :bpy.types.Image

Node Context

bpy.context.selected_nodes
Type :sequence of bpy.types.Node

Text Context

bpy.context.edit_text
Type :bpy.types.Text

Table Of Contents

Previous topic

Blender Documentation contents

Next topic

Data Access (bpy.data)