Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import bpy
for window in
for area in window.screen.areas:
# areas, Editors(UV/3D/Node)/Properties/Outliner...etc
if not area.type == 'VIEW_3D':
# each area has potentially panels, and headers open.
# you are just interested in the 3d part.
for s in area.spaces:
if s.type == 'VIEW_3D':
print(area.height, area.width)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment