Context(bpy_struct)

base class — bpy_struct

class bpy.types.Context.Context(bpy_struct)

Current windowmanager and data context

area
Type

Area, (readonly)

blend_data
Type

BlendData, (readonly)

collection
Type

Collection, (readonly)

engine
Type

string, default “”, (readonly, never None)

gizmo_group
Type

GizmoGroup, (readonly)

layer_collection
Type

LayerCollection, (readonly)

mode
Type

enum in [‘EDIT_MESH’, ‘EDIT_CURVE’, ‘EDIT_SURFACE’, ‘EDIT_TEXT’, ‘EDIT_ARMATURE’, ‘EDIT_METABALL’, ‘EDIT_LATTICE’, ‘POSE’, ‘SCULPT’, ‘PAINT_WEIGHT’, ‘PAINT_VERTEX’, ‘PAINT_TEXTURE’, ‘PARTICLE’, ‘OBJECT’, ‘PAINT_GPENCIL’, ‘EDIT_GPENCIL’, ‘SCULPT_GPENCIL’, ‘WEIGHT_GPENCIL’, ‘VERTEX_GPENCIL’], default ‘EDIT_MESH’, (readonly)

preferences
Type

Preferences, (readonly)

region
Type

Region, (readonly)

region_data
Type

RegionView3D, (readonly)

scene
Type

Scene, (readonly)

screen
Type

Screen, (readonly)

space_data
Type

Space, (readonly)

tool_settings
Type

ToolSettings, (readonly)

view_layer
Type

ViewLayer, (readonly)

window
Type

Window, (readonly)

window_manager
Type

WindowManager, (readonly)

workspace
Type

WorkSpace, (readonly)

evaluated_depsgraph_get()

Get the dependency graph for the current scene and view layer, to access to data-blocks with animation and modifiers applied. If any data-blocks have been edited, the dependency graph will be updated. This invalidates all references to evaluated data-blocks from the dependency graph.

Returns

Evaluated dependency graph

Return type

Depsgraph

copy()
classmethod bl_rna_get_subclass(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The RNA type or default when not found.

Return type

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The class or default when not found.

Return type

type

Inherited Properties

  • bpy_struct.id_data

Inherited Functions

  • bpy_struct.as_pointer

  • bpy_struct.driver_add

  • bpy_struct.driver_remove

  • bpy_struct.get

  • bpy_struct.is_property_hidden

  • bpy_struct.is_property_overridable_library

  • bpy_struct.is_property_readonly

  • bpy_struct.is_property_set

  • bpy_struct.items

  • bpy_struct.keyframe_delete

  • bpy_struct.keyframe_insert

  • bpy_struct.keys

  • bpy_struct.path_from_id

  • bpy_struct.path_resolve

  • bpy_struct.pop

  • bpy_struct.property_overridable_library_set

  • bpy_struct.property_unset

  • bpy_struct.type_recast

  • bpy_struct.values

References

  • Gizmo.draw

  • Gizmo.draw_select

  • Gizmo.exit

  • Gizmo.invoke

  • Gizmo.modal

  • Gizmo.test_select

  • GizmoGroup.draw_prepare

  • GizmoGroup.invoke_prepare

  • GizmoGroup.poll

  • GizmoGroup.refresh

  • GizmoGroup.setup

  • Header.draw

  • KeyingSetInfo.generate

  • KeyingSetInfo.iterator

  • KeyingSetInfo.poll

  • Macro.draw

  • Macro.poll

  • Menu.draw

  • Menu.poll

  • Node.draw_buttons

  • Node.draw_buttons_ext

  • Node.init

  • Node.socket_value_update

  • NodeInternal.draw_buttons

  • NodeInternal.draw_buttons_ext

  • NodeSocket.draw

  • NodeSocket.draw_color

  • NodeSocketInterface.draw

  • NodeSocketInterface.draw_color

  • NodeSocketInterfaceStandard.draw

  • NodeSocketInterfaceStandard.draw_color

  • NodeSocketStandard.draw

  • NodeSocketStandard.draw_color

  • NodeTree.get_from_context

  • NodeTree.interface_update

  • NodeTree.poll

  • Operator.cancel

  • Operator.check

  • Operator.description

  • Operator.draw

  • Operator.execute

  • Operator.invoke

  • Operator.modal

  • Operator.poll

  • Panel.draw

  • Panel.draw_header

  • Panel.draw_header_preset

  • Panel.poll

  • RenderEngine.view_draw

  • RenderEngine.view_update

  • UIList.draw_filter

  • UIList.draw_item

  • UIList.filter_items

  • XrSessionState.is_running

  • XrSessionState.reset_to_base_pose