How to pop up a window at the cursor position and with a custom window size in X/Y? is this impossible to do this within blender?

hello

this is a hack to pop up a new window to a specific size

import bpy

render = bpy.context.scene.render

originalX = render.resolution_x
originalY = render.resolution_y


render.resolution_x = 50
render.resolution_y = 800
render.resolution_percentage = 100
render.display_mode = "WINDOW"

# Call image editor window
bpy.ops.render.view_show("INVOKE_DEFAULT") #MEHHHHHHHHHHH
#bpy.ops.render.screen.area_dupli('INVOKE_DEFAULT')

render.resolution_x = originalX 
render.resolution_y = originalY 

this is a dupplication of the area to a new window, the new window will appear at the custo location, cool , but not way to change its size ??

import bpy

bpy.ops.screen.area_dupli('INVOKE_DEFAULT')
bpy.context.window_manager.windows[-1].screen.areas[0].type = 'OUTLINER'

so there’s two possibility :

  • either there’s a way to move the newly poped window of the first solution to the cursor location ?
  • or there’s a way to resize the newly dupplicated window of the second solution.

both solutions seems impossible to do through blender python, am i wrong ? this is impossible right ?

1 Like