How to split and join Blender interface windows thruough the python API

A set of operators is provided in Blender for manipulating with the location of its interface windows.

To split the current window (using the current context) into two in a specified ratio, we need to execute the following operator:

With:

  • direction – set the splitting direction (‘HORIZONTAL’ or ‘VERTICAL’)
  • factor – percentage ratio of splitting windows

A new window (new area) is appended to the end of the bpy.context.screen.areas list and can be obtained through the:

To join two windows into one, we need to execute the following operator:

With:

  • x1, y1 – left top corner coordinates of the joined window (area)

Area corner coordinates we can get from the area “x” and “y” properties:

Nikita

Author: Nikita

Blender add-ons developer and articles writer.