mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix problem with independent window
This commit is contained in:
parent
7e3e567f00
commit
bfdfa78e57
1 changed files with 5 additions and 6 deletions
|
|
@ -273,10 +273,9 @@ def _independent_window():
|
|||
current_windows = set(bpy.context.window_manager.windows)
|
||||
with bpy.context.temp_override(**context):
|
||||
bpy.ops.wm.window_new()
|
||||
window = list(set(bpy.context.window_manager.windows) - current_windows)[0]
|
||||
context["window"] = window
|
||||
try:
|
||||
yield window
|
||||
finally:
|
||||
with bpy.context.temp_override(**context):
|
||||
window = list(set(bpy.context.window_manager.windows) - current_windows)[0]
|
||||
context["window"] = window
|
||||
try:
|
||||
yield window
|
||||
finally:
|
||||
bpy.ops.wm.window_close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue