2
$\begingroup$

Is there a way to get the window size with python?

I found things like: https://stackoverflow.com/questions/7142342/get-window-position-size-with-python

But those are either Windows (as in the OS) specific, or require installs. I'm guessing blender has this information somewhere.

$\endgroup$

1 Answer 1

4
$\begingroup$
import bpy

wm = bpy.context.window_manager
for w in wm.windows:
    print(w.width)
    print(w.height)
$\endgroup$
4
  • $\begingroup$ I it also possible to get the display size? $\endgroup$
    – clankill3r
    Feb 9 at 9:56
  • $\begingroup$ What does display size mean? make a screenshot and let me know. $\endgroup$
    – X Y
    Feb 9 at 10:48
  • $\begingroup$ The size of the display in pixels. E.g. monitor resolution. $\endgroup$
    – clankill3r
    Feb 9 at 12:36
  • $\begingroup$ I didn't find monitor resolution in blender api. $\endgroup$
    – X Y
    Feb 9 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.