Window(bpy_struct)

base class — bpy_struct

class bpy.types.Window(bpy_struct)

Open window

height

Window height (in [0, 32767], default 0, readonly)

Type:

int

modal_operators

A list of currently running modal operators (default None, readonly)

Type:

bpy_prop_collection[Operator]

parent

Active workspace and scene follow this window (readonly)

Type:

Window

scene

Active scene to be edited in the window (never None)

Type:

Scene

screen

Active workspace screen showing in the window (never None)

Type:

Screen

stereo_3d_display

Settings for stereo 3D display (readonly, never None)

Type:

Stereo3dDisplay

support_hdr_color

The window has a HDR graphics buffer that wide gamut and high dynamic range colors can be written to, in extended sRGB color space. (default False, readonly)

Type:

bool

view_layer

The active workspace view layer showing in the window (never None)

Type:

ViewLayer

width

Window width (in [0, 32767], default 0, readonly)

Type:

int

workspace

Active workspace showing in the window (never None)

Type:

WorkSpace

x

Horizontal location of the window (in [-32768, 32767], default 0, readonly)

Type:

int

y

Vertical location of the window (in [-32768, 32767], default 0, readonly)

Type:

int

cursor_warp(x, y)

Set the cursor position

Parameters:
  • x (int) – (in [-inf, inf])

  • y (int) – (in [-inf, inf])

cursor_set(cursor)

Set the cursor

Parameters:

cursor (Literal[Window Cursor Items]) – cursor

cursor_modal_set(cursor)

Set the cursor, so the previous cursor can be restored

Parameters:

cursor (Literal[Window Cursor Items]) – cursor

cursor_modal_restore()

Restore the previous cursor after calling cursor_modal_set

event_simulate(type, value, *, unicode='', x=0, y=0, shift=False, ctrl=False, alt=False, oskey=False, hyper=False)

event_simulate

Parameters:
  • type (Literal[Event Type Items]) – Type

  • value (Literal[Event Value Items]) – Value

  • unicode (str) – (optional)

  • x (int) – (in [-inf, inf], optional)

  • y (int) – (in [-inf, inf], optional)

  • shift (bool) – Shift, (optional)

  • ctrl (bool) – Ctrl, (optional)

  • alt (bool) – Alt, (optional)

  • oskey (bool) – OS Key, (optional)

  • hyper (bool) – Hyper, (optional)

Returns:

Item, Added key map item

Return type:

Event

find_playing_scene(*, scrub=False)

find_playing_scene

Parameters:

scrub (bool) – Scrubbing, Check if time in the scene is being scrubbed (optional)

Returns:

Scene, Scene that is currently playing

Return type:

Scene

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References