Post #1304: : post_01305
🏷️ Tags
popup-dialog hotkeys advanced solved
⚙️ Related PME Features
- Pie Menu Editor
- Popup Dialog Editor
- Macro Editor
- Python Scripting
💬 Content
roaoao:
Nice idea!
x, y - edge location in pixels
delta - move distance in pixels.To use area_move operator in python we need to move the cursor over the edge we want to move using C.window.cursor_warp(x, y).
The problem is that cursor_warp function needs some time to work. So we need to execute area_move operator with some delay using bpy.ops.pme.timeout(cmd=“”, delay=0.0001) operator.Here is an example:
a = C.area; x = a.x + (a.width >> 1); y = a.y + a.height; C.window.cursor_warp(x, y); bpy.ops.pme.timeout(delay=0.0001, cmd="bpy.ops.screen.area_move(x=%d, y=%d, delta=-100)" % (x, y))
roaoao, THanks
That is very cool, I was thinking more about the action would Jump the window open to a preset size. Please view video
❤️ 1 likes